Which method is used to save small UI state before the activity is destroyed?
- onPause()
- onSaveInstanceState(outState: Bundle)
- finish()
- onStop()
Answer
B) onSaveInstanceState(outState: Bundle)
Values put into outState are returned in onCreate's savedInstanceState.
Computer Science MCQ · More Screen Components and Orientation MCQs · Practise