android - Does onSaveInstanceState always save my Member variables in Fragment? -


i switch fragment when ondestroyedview() called,member variables kept, , when ondestroy() called, restore them bundle, because onsaveinstancestate called before ondestroy().but face problem member variables reset initial values,i have lots of documents don't know why happen?

does onsaveinstancestate save member variables in fragment?

no. onsaveinstancestate() saves whatever put in bundle passed in parameter. values out of bundle in oncreate() or other fragment lifecycle methods.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -