12-29-2012 01:14 AM
Hi, I developed a BB application on which I create many custom buttons , on click of this it will show the respective pages
when I press the back button it will reach on the main screen where the buttons are drawn & it will show the focus on first button if I click on the fifth button then the focus is should be on fifth button when I come back on the main Screen where the buttons are drawn
If any code thanks for it
12-29-2012 06:35 AM
If you use the usual BlackBerry process of pushing the new screen and then when it is finished, that screen is popped exposing the original screen, this will happen automatically.
If you recreate the screen on return, you will have to remember which screen you last invoked and setFocus on the associated Button. Aside from the
<field>.setFocus();
there is nothing "magic" in this code.
I would try to us the push/pop mechanism if you can because that is how users expect the BlackBerry to work.
01-03-2013 12:33 AM
Can any one give me short code for this...........
01-03-2013 05:41 AM
By this, do you mean pushing and popping screens? I think most of the RIM supplied samples do it.
01-05-2013 06:52 AM
on my application i use so many custom buttons and when come back to main screen I read xml file and for come back i use the
UiApplication.getUiApplication().pushScreen(objMen
Thanks
01-05-2013 08:51 AM
Before we try to create a workaround to solve your specific problem, we should make sure that you are in fact doing it correctly.
The process is typically.
1) Create and push screen A
2) user clicks on something on Screen A, so application creates and pushes Screen B
At this point the user is seeing Screen B. But in fact Screen A is underneath Screen B and so hidden
3) User closes Screen B and it is popped of the display stack, now the user can see Screen A
At this point Screen A is in the same state as it was when the user clicked to get Screen B. The button pressed to go to Screen B remains focused as it was.
So why doesn't this process work for you?