Game Development Reference
In-Depth Information
Yes
onPause()
Called once another activity gets into the foreground. This
method is typically used to commit unsaved changes to per-
sistent data, stop animations, and so on.
onStop()
Yes
Called when the activity is no longer visible to the user. This
may happen because it is being destroyed, or because anoth-
er has been resumed and is covering it.
onDestroy()
Yes
Called before the activity is destroyed. This is the final
call that the activity will receive. It could be called either
because the activity is finishing or because the system is
temporarily destroying this instance of the activity to save
space.
Table 2.2 Activity's Lifecycle Callback Methods
The lifecycle of an activity with its predefined methods can be displayed in the diagram
below (figure 2.10).
Search WWH ::




Custom Search