Which Jetpack class keeps UI data alive across configuration changes?

  1. Intent
  2. Fragment
  3. ViewModel
  4. Bundle
Answer

C) ViewModel

ViewModel instances survive recreation of the activity.

Computer Science MCQ · More Screen Components and Orientation MCQs · Practise