Activity Lifecycle Flashcards
onCreate
In the creation state, activities load the static user interface elements and allocate system resources such as the display device, network device, and other resources required for the application.
onStart
After creation by the onCreate method, an activity enters the started state. It becomes visible and ready to handle user interaction.
onResume
In the resumed state, all actions are performed, such as user input, drawing new user interface elements according to user input, and so on.
onPause
In the paused state, the application is taken to the background, or another application is started and brought to the front.
onStop
In the stopped state, the application is totally invisible and in a sleeping state.
onDestroy
The destroyed state means that all processes are killed and all device resources released.
onSaveInstanceState
In this function it is possible to save activity state ina Bundle to be restored in the onCreate(Bundle) method