android - how to use OnPause method -


how change button text loaded edittext while in onpause() method?

for example

@override public void onpause(){     button.settext(text.gettext().tostring());     super.onpause() } 

when press button not change button text

leaving aside question of why want in onpause() in first place...

normally, state of views saved in onsaveinstancestate(...). according the docs, there no guarantees whether call onsaveinstancestate(...) occur before or after call onpause(). if onsaveinstancestate(...) called before onpause(), changes make in onpause() lost.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -