How to update screen in blackberry?

2019-07-19 04:38发布

问题:

i am developing one app. and i am facing a problem related to updating the screen,which is already in stack.I tried to use myappscreen.invalidate() on button click,but it doesn't update screen.

Please help me to solve this problem.

回答1:

Is your screen the active screen?

To redraw the active screen, you should just need to call the invalidate() method to cause the screen to refresh.

Where are you calling invalidate() from? You cannot call invalidate() from a Timer thread unless you have got an eventlock.



回答2:

If you want to update screen then override activate() of UiApplication and write code in that which you want to update.