Multiple choice technology platforms and products

The onStart() and onStop() methods can be called multiple times, as the activity alternates between being visible and hidden to the user.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

True. The onStart() and onStop() methods can be called multiple times during an activity's lifetime. Each time the activity becomes visible to the user, onStart() is called, and when it's no longer visible, onStop() is called. This cycle can repeat many times - for example, when the user navigates to other apps and returns, or when a dialog appears and disappears.

AI explanation

The statement is True. Per the Android activity lifecycle, onStart() and onStop() are invoked every time the activity transitions between being visible and hidden to the user — for example when the app is backgrounded and later brought back to the foreground — so these callbacks can fire many times over an activity's life, unlike the one-time onCreate().