Sign in Go Pro

Android Architecture Components - A Deep Dive

Diving into the Lifecycle Component

 
Autoplay

Up next

Previous

About

Lifecycle component is designed to help us deal with the lifecycle challenge by making the lifecycle observable which in turn can be used to build lifecycle-aware components.
By using lifecycle-aware components, we can move the code of dependent components out of the lifecycle methods and into the components themselves which helps in better-organized and lighter-weight code, which is easy to maintain.

In this lesson, we will look at the anatomy of Lifecycle which will help in understanding how the lifecycle component internally works and learn how to build a simple LifecycleObserver to log when certain lifecycle events happen in Activity or Fragment. Lastly, we will look at how to attach the observers to the LifecycleOwner which are our Activity and Fragment.

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in Android Architecture Components - A Deep Dive