Explain the onsavedinstancestate() and onrestoreinstancestate() in activity?



Explain the onsavedinstancestate() and onrestoreinstancestate() in activity?..

Answer / Mohit Kumar Prasad

onSavedInstanceState() is a method used to save the state of an activity so that it can be restored later when the activity is recreated. This is useful for retaining user data when the activity is recreated, such as when the device orientation changes or the activity is killed by the system. onRestoreInstanceState() is a method called after onCreate() when the instance state has been retrieved and can be used to restore the saved state.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Android OS Interview Questions

How does recyclerview differ from listview?

1 Answers  


Explain what sre the advance features of android os?

1 Answers  


Can I update my version of android?

1 Answers  


what is the difference between dynamic receiver and static receiver? When will you use dynamic broadcast receivers?

1 Answers  


What is cryptoobject?

1 Answers  


What is tdd (test-driven development)?

1 Answers  


What is bin file in android?

1 Answers  


What is the difference between android system and android os?

1 Answers  


How can your application perform actions that are provided by other application e.g. Sending email?

1 Answers  


What is looper, handler, and message queue in Android?

1 Answers   SkillGun Technologies,


What is anim/ directory?

1 Answers  


How to make a textview to be editable?

1 Answers  


Categories