Android Activity follows a Lifecycle from its time of creation till it gets destroyed. In this Article you will Learn about the Lifecycle.
As you can see in the attached diagram an Activity starts when its Launched. That’s the time its Constructor is run and object is created.
This is followed by the onCreate method which is responsible for Screen setup.
The next lifecycle method onStart gets called when the Activity becomes visible to the user.
Now an Activity can become invisible for a period of time. This is handled by the onStop method.
If an Activity becomes visible again then onRestart method is called.
Finally when an Activity gets destroyed then onDestroy is called.