02-21-2011 02:46 AM
Im facing a problem. I have 2 screen , from the first screen when button is pressed im calling the second screen , im also sending the first screen(this) to the second screen and from the second screen im trying to invalidate with the firstscreen object. even through i try to invalidate nothing is happening .
Can any one tell a soluiton for the same.
Solved! Go to Solution.
02-21-2011 03:50 AM
what exactly are you trying to achieve?
if the second screen is on top you will not able to see anything on the first one.
02-21-2011 04:57 AM
To be simple i need to invalidate a screen which on the top of the stack.
From the first screen on the button press im moving to the second screen . so now first screen is on the top of the stack . now i will close the second screen and try to invalidate the first one. but it is not working
a small briefing just to express what i want to tell . not a working code 1) From the first screen im moving to the second screen SosMessageScreen sospredefinedmessageScreen = new SosMessageScreen(this); UiApplication.getUiApplication().pushScreen(sospre
definedmessageScreen); 2) From the second screen UiApplication.getUiApplication().popScreen(this); objectoffirstscreen.invalidate
Hope it is clear
02-21-2011 05:02 AM
and what do you want to achieve with the invalidate?
02-21-2011 05:33 AM
invalidate does not change anything.
you have to call setText on textfields etc to set new values. this invalidates them automatically.
you can either write an update method (to call from screen2) or use on onUiEngineAttached to update the screen each time it is displayed.
05-24-2012 06:03 AM
Here onUiEngineAttached is working if screen is attaching to main thread or stack and when screen is detaching,
it means u write onUiEngineAttached if(attached) that means screen is attaching and if(!attached) means screen is detaching..
05-24-2012 06:15 AM