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

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

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -