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
Post a Comment