Which of the following Activity life-cycle methods is called once the activity is no longer visible?
Which of the following Activity life-cycle methods is called once the activity is no longer visible?
The method called once the activity is no longer visible is onStop. This is an official part of the Android activity lifecycle. When an activity goes to the background and is no longer visible, the onStop method is invoked. This is distinct from onPause, which is called when the activity is partially obscured but might still be visible, and onDestroy, which is called when the activity is finished and about to be destroyed. There is no method named onHide in the official Android activity lifecycle.
A. onStop