36.4 Lifecycle States and Events
When the status of a lifecycle owner changes, the assigned Lifecycle object will be updated with the new state. At any given time, a lifecycle owner will be in one of the following five states:
•Lifecycle.State.INITIALIZED
•Lifecycle.State.CREATED
•Lifecycle.State.STARTED
•Lifecycle.State.RESUMED
•Lifecycle.State.DESTROYED
As the component transitions through the different states, the Lifecycle object will trigger events on any observers that have been added to the list. The following events are available for implementation within the lifecycle observer:
•Lifecycle.Event.ON_CREATE
•Lifecycle.Event.ON_START
•Lifecycle.Event.ON_RESUME
•Lifecycle.Event.ON_PAUSE
•Lifecycle.Event.ON_STOP
•Lifecycle.Event.ON_DESTROY
•Lifecycle.Event.ON_ANY
Annotations are used within the observer class to associate methods with lifecycle events. The...