5.3 Technologies Overview
This section presents the new technologies that we use in the Doodlz app.
5.3.1 Activity
and Fragment
Lifecycle Methods
A Fragment
’s lifecycle is tied to that of its parent Activity
. There are six Activity
lifecycle methods that have corresponding Fragment
lifecycle methods—onCreate
, onStart
, onResume
, onPause
, onStop
and onDestroy
. When the system calls these methods on an Activity
, it will also call the corresponding methods (and potentially other Fragment
lifecycle methods) on all of the Activity
’s attached Fragment
s.
This app uses Fragment
lifecycle methods onResume
and onPause
. An Activity
’s onResume
method is called when a Fragment
is on the screen and ready for the user to interact with it. When an Activity ...
Get Android How to Program, 3/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.