Which method is used to save small UI state before the activity is destroyed?

  1. onPause()
  2. onSaveInstanceState(outState: Bundle)
  3. finish()
  4. 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