Changes

Handling Android Activity State Changes

67 bytes added, 20:43, 9 January 2019
Lifetimes
Failure to make this super class call in method overrides will result in the runtime throwing an exception during execution. While calls to the super class in the onRestoreInstanceState() and onSaveInstanceState() methods are optional (they can, for example, be omitted when implementing custom save and restoration behavior) there are considerable benefits to using them, a subject that will be covered in the chapter entitled “Saving and Restoring the State of an Android Activity”.
== Lifetimes Lifetimes ==
The final topic to be covered involves an outline of the entire, visible and foreground lifetimes through which an activity or fragment will transition during execution:
The concepts of lifetimes and lifecycle methods are illustrated in Figure 12-2:
 [[ImageFile:android_activity_lifecycle_methods.png|The Android lifetime and lifecycle diagram]] 
== Disabling Configuration Change Restarts ==