What is onSavedInstanceState() and onRestoreInstanceState() in activity? Flashcards
1
Q
Question
A
onSavedInstanceState() - This method is used to store data before pausing the activity.
onRestoreInstanceState() - This method is used to recover the saved state of an activity when the activity is recreated after destruction. So, the onRestoreInstanceState() receive the bundle that contains the instance state information.