In my application I have a requirement to navigate from one screen to another without popping up the active screen so that if a user clicks the back button while navigating he should be able to view the previous screens where he came from. I implemented this by pushing screens one by one in the UI stack but while doing so I saw that there is a considerable consumption of the memory. Can anyone tell me how can I minimize the memory 开发者_Go百科used. In my app I saw that the memory is not released that much.
you can achieve it by this way .... it will work as you want.
ButtonField yourButton = new ButtonField("your Buton"){
protected boolean navigationClick(int status, int time) {
UiApplication.getUiApplication().
popScreen(UiApplication.getUiApplication().getActiveScreen());
return true;
}
};
The memory issue was not due to pushing so much screens to the display stack. I had some serious issues in my code due to which the resources were not releasing ending up in OutOfMemory exception.
I had corrected them and due to that my application is working well now. As far as I know now, there should not be any issues in pushing so many screens. It should work well.
精彩评论