What is the Android Activity Lifecycle?

What is the Android Activity Lifecycle?

Android Activity Lifecycle is controlled by 7 methods of android.app.Activity class, which in turn is the he subclass of ContextThemeWrapper class.

Here are the 7 lifecycle methods of android activity:

  • onCreate - called when activity is first created
  • onStart - called when activity is becoming visible to the user
  • onResume - called when activity will start interacting with the user
  • onPause - called when activity is not visible to the user
  • onStop - called when activity is no longer visible to the user
  • onRestart - called after your activity is stopped, prior to start
  • onDestroy - called before the activity is destroyed

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.