android - How do you clear the saved instance data? -


in activity's oncreate, passed savedinstancestate bundle, how can clear data? i'm referring not bundle you're getting itself, data bundle created/loaded android.

this occasional clear, , don't want clear of rest of app's data (ie. shouldn't clear preferences, db, etc.).

i'm considering falling having flag , logic conditionally ignore saved state, sounds clumsier clearing saved state.

you could pass null super.oncreate(null) - savedinstancestate saved state of activity instance , (probably) doesn't contain preferences or persistent data.

i'm not sure why want ignore sis - example, if user typing edittext, switches app , comes later, you'd lose text entered.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -