Welcome to the Android Activity State Changes Quiz! This quiz is designed to test your understanding of key concepts related to Android activity and fragment lifecycle management, as outlined in the chapter. You’ll explore topics such as lifecycle methods, state management, configuration changes, and modern lifecycle techniques. Each question includes detailed explanations to reinforce your learning.
1.
What does the entire lifetime of an activity encompass?
2.
What does the foreground lifetime of an activity refer to?
3.
What is the difference between persistent state and dynamic state?
4.
Which method is called when an activity is restarted after being stopped?
5.
Which lifecycle method is used for initializing an activity when it is first created?
6.
What is the role of the Bundle parameter in onCreate() and onRestoreInstanceState()?
7.
What is a drawback of lifecycle methods for custom classes?
8.
What does the android:configChanges directive do?
9.
What is the primary objective of lifecycle management in Android?
10.
Which method is used to restore dynamic state after an activity is recreated?
11.
What is the limitation of traditional lifecycle methods in observing state changes?
12.
What is a significant advantage of lifecycle-aware components?
13.
What is the role of the onPause() method?
14.
What is the purpose of the onConfigurationChanged() method?
15.
Which lifecycle method is unique to fragments?
16.
What is multi-resume in Android?
17.
What does the onResume() lifecycle method signify?
18.
What happens if a lifecycle method override does not call the corresponding superclass method?
19.
Which method is used to save dynamic state before an activity is destroyed?
20.
What is the purpose of the onTopResumedActivityChanged() method?