BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-10-2009, 03:11 AM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Model: 8320
PIN: N/A
Carrier: china mobile
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Scscreen.onDisplay(), and Screen.afterDisplay()?

Please Login to Remove!

In blackBerry Screen class ,there is a method onDisplay() to do something before showing the screen .

Code:
onDisplay

protected void onDisplay()

    Invoked when this screen is pushed onto the display stack.
now i want do something after a screen has been painted. just like afterDisplay() or afterPaint().

there is a way to do this? any help? thanks!
Offline  
Old 03-10-2009, 09:44 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2009
Model: 9000
PIN: N/A
Carrier: T-Mobile
Posts: 67
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

onExposed()?
Offline  
Old 03-10-2009, 07:53 PM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Model: 8320
PIN: N/A
Carrier: china mobile
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

only after onObscured() method called(some screen, dialog or open the menu will cause this method be called), the onExposed() method has being called.

right now I use this:

Code:
protected void onDisplay() {
		super.onDisplay();
		getApplication().invokeLater(new Runnable() {

			public void run() {
				Dialog.alert("on dispaly method called!");
				
			}
			
		});
	}
looks like, after the screen displayed , the alert is showing.
Offline  
Old 03-15-2009, 06:49 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Nov 2008
Location: Sioux Falls, SD
Model: 9530
PIN: N/A
Carrier: Verizon Wireless
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Depending on which version you're using, try onUiEngineAttached.
__________________
Handspring >> Palm >> BB Pearl >> BB Storm

Tumblog: http://www.geekkink.com
Blog: http://www.zechariahs.org/blog
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.