01-18-2012 04:54 AM
I want to know in blackberry which method is called when screen lost focus but still visible ?
For example , one screen is in foreground and we disply dialog box then that screen is visible but has not focus, so at that time which methos called when we close that dialog box??
Please help me please please
Solved! Go to Solution.
01-18-2012 05:29 AM - edited 01-18-2012 05:37 AM
Override the following methods in your screen class as per your requirements
1. When the screen pushed in to the stack
onUiEngineAttached(boolean attached) - if attached is true then your screen is in the top of the screen
2. When you are in a screen and lcd backlight turns off in your idle state and again turns on when you are actively performing in that screen
onVisibilityChange(boolean visible) - if visible is true then you are getting the focus when the lcd turns
3. When your application goes to the background by clicking the red end button (i.e., without quiting the app, still yours is in active in the background)
onExposed() - when your app comes to foreground from the background or when any screen which is in the top get popped off
onObscured() - when your app goes to the background or when a screen pushed over your current top most screen
01-18-2012 06:34 AM