What is life cycle of Activity.

Life cycle of Activity is discussed here step by step.

Life Cycle Of Activity:.

In this section i am going to describe the life cycle of activity.

First open the android studio and create a project and give the name of your project like OpenActivityDemo.

The following image show the life cycle of activity:

Smiley face

There are seven methods that responsible for the life cycle of Activity we discuss one by one.

onCreate(Bundle savedInstanceState):This method is responsible for creating the activity when first time Activity call or launched.

onStart():This method is called when the activity is visible to the user.

onResume():This method is called when the user interact with the activity.

onPause()This method is called when the system is about to start resuming a previous activity.

onStop()this method is called when the activity is no longer visible to the user, because another activity has been resumed and is covering this one

onRestart()This method is called after your activity has been stopped, prior to it being started again.

onDestroy:This method is final call when your activity is going destroyed

Life Cycle Of Activity.

What is life cycle of activity for video Click here

Smiley face                     Smiley face