Complete the code to override the method that is called when the activity is first created.
override fun [1](savedInstanceState: Bundle?) { super.[1](savedInstanceState) setContentView(R.layout.activity_main) }
The onCreate method is called when the activity is first created. It is where you initialize your UI.
Complete the code to override the method called when the activity becomes visible to the user.
override fun [1]() { super.[1]() // Activity is now visible }
The onStart method is called when the activity becomes visible to the user but is not yet interactive.
Fix the error in overriding the method that is called when the activity is about to go into the background.
override fun [1]() { super.[1]() // Pause ongoing actions }
The onPause method is called when the activity is partially obscured or about to go into the background. It is used to pause ongoing actions.
Fill both blanks to override methods that handle when the activity is no longer visible and when it is destroyed.
override fun [1]() { super.[1]() // Activity is no longer visible } override fun [2]() { super.[2]() // Cleanup before activity is destroyed }
onStop is called when the activity is no longer visible. onDestroy is called before the activity is destroyed and is used for cleanup.
Fill all three blanks to override methods that manage the activity lifecycle from visible to interactive to paused.
override fun [1]() { super.[1]() // Activity is visible } override fun [2]() { super.[2]() // Activity is interactive } override fun [3]() { super.[3]() // Activity is partially obscured }
onStart is called when the activity becomes visible, onResume when it becomes interactive, and onPause when it is partially obscured or losing focus.