Changes

Jump to: navigation, search

Modern Android App Architecture with Jetpack

5 bytes added, 18:12, 11 January 2019
Android Lifecycles
Data binding will be covered in greater detail starting with the chapter entitled [[An Overview of Android Jetpack Data Binding]].
== Android Android Lifecycles ==
The duration from when an Android component is created to the point that it is destroyed is referred to as the lifecycle. During this lifecycle, the component will change between different lifecycle states, usually under the control of the operating system and in response to user actions. An activity, for example, will begin in the initialized state before transitioning to the created state. Once the activity is running it will switch to the started state from which it will cycle through various states including created, started, resumed and destroyed.
Many Android Framework classes and components allow other objects to access their current state. Lifecycle observers may also be used so that an object receives notification when the lifecycle state of another object changes. This is the technique used behind the scenes by the ViewModel component to identify when an observer has restarted or been destroyed. This functionality is not limited to Android framework and architecture components and may also be built into any other classes using a set lifecycle components included with the architecture components.
Objects that are able to detect and react to lifecycle state changes in other objects are said to be lifecycle-aware, while objects that provide access to their lifecycle state are called lifecycle-owners. Lifecycles will be covered in greater detail in the chapter entitled [[Working with Android Jetpack Lifecycle-Aware Components]].
== Repository Modules ==

Navigation menu