Ported from Android Developer
Activity
Managing the Activity Lifecycle
As you'll learn in the following lessons, there are several situations in which an activity transitions between different states that are illustrated in figure 1. However, only three of these states can be static. That is, the activity can exist in one of only three states for an extended period of time:
The other states (Created and Started) are transient and the system quickly moves from them to the next state by calling the next lifecycle callback method. That is, after the system calls onCreate()
, it quickly calls onStart()
, which is quickly followed by onResume()
.
That's it for the basic activity lifecycle.
About the difference between onStop and onPause causing the state
Difference between onPause and onStop
Simply put, after the activity is paused, it may only be partially blocked, and other places are visible, or the activity above is transparent, but cannot interact with the user; but it is completely invisible after stopping.
Fragment
Building a Dynamic UI with Fragments