Activity life cycle: When a new activity comes on top of your activity completely, then what is the life cycle function that gets executed in the old activity?

Answer: it calls onPause() -> then -> onStop()

Description:
When new activity comes on top of an existing activity, then existing activity will move to invisible state by calling onPause() -> then -> onStop. If top activity is transparent or doesn't occupy complete screen, then below activity's onStop() will not be called.

No comments:

Post a Comment