1.

What is the life cycle of Android activity?

Answer»
  • OnCreate(): It is called when activity is created. Using this, the VIEWS are created and data is collected from bundles.
  • OnStart(): It is called if the activity is becoming visible to the USER. It may be succeeded by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.
  • OnResume(): It is called when the activity will start an interaction with the user.
  • OnPause(): This is called when the activity is moving to the background but hasn’t been KILLED yet.
  • OnStop(): This is called when an activity is no longer visible to the user.
  • OnDestroy(): This is called when the activity is finished or destroyed.
  • OnRestart(): This is called after the activity has been stopped, prior to it being STARTED again.
Life Cycle of Android


Discussion

No Comment Found