Quizzma Latest Questions

Which of the following methods is first called in an Activity when another activity gets into the foreground?

Which of the following methods is first called in an Activity when another activity gets into the foreground? A. onStop

B. onPause

C. onDestroy

D. onExit




Leave an answer

Leave an answer

What is the capital of Egypt? ( Cairo )

1 Answer

  1. The correct answer is B. onPause.

    When another activity comes into the foreground, the current activity goes through several lifecycle methods. The first one called is `onPause()`, which indicates that the activity is partially obscured and no longer in the foreground. After `onPause()`, the `onStop()` method is called if the activity is completely hidden.

    If you have more questions about Android activity lifecycle or other topics, feel free to ask or check the extended services page for further assistance!

Related Questions