Quick Answer: How Do I Use onSaveInstanceState on Android?
Contents How Do I Use onSaveInstanceState? the onSaveInstanceState() Method Allows You to Add Key/Value Pairs to the outState of the App. Then the...
Contents
How do I use onSaveInstanceState?
The onSaveInstanceState() method allows you to add key/value pairs to the outState of the app. Then the onRestoreInstanceState() method will allow you to retrieve the value and set it back to the variable from which it was originally collected.
How do I use savedInstanceState on Android?
The savedInstanceState is a reference to a Bundle object that is passed into the onCreate method of every Android Activity. Activities have the ability, under special circumstances, to restore themselves to a previous state using the data stored in this bundle.