Changes

Jump to: navigation, search

An Android Jetpack Lifecycle Tutorial

59 bytes removed, 18:46, 16 January 2019
Creating a Lifecycle Owner
Before moving to the next section in this chapter, take some time to compare the output from the app with the flow chart in Figure 36-2 of the previous chapter.
<htmlet>androidstudio32</htmlet>
== Creating Creating a Lifecycle Owner ==
The final task in this chapter is to create a custom lifecycle owner class and demonstrate how to trigger events and modify the lifecycle state from within that class.
    demoOwner.startOwner();
    demoOwner.stopOwner();
    getLifecycle().addObserver(new DemoObserver());
}
</pre>

Navigation menu