Activity in Android is a building blocks of Android . It is a screen to which user interact with.
Every Activity in android has lifecycle like
It is created,
started,
paused,
stopped,
resumed,
and
destroyed.

These different states of a screen are known as Activity Lifecycle.
In other words we can say Activity is a class pre-written in Java or Kotlin Lanaguage.

In Java follwoing are the Activity functions

onCreate() – It is called when the activity is first created

onStart() – It is called just after it’s creation or by restart method after onStop(). Here Activity start becoming visible to user

onPause() – It is called when Activity content is not visible because user resume previous activity

onResume() – It is called when Activity is visible to user and user can interact with it

onStop() – It is called when activity is not visible to user because some other activity takes place of it

onRestart() – It is called when user comes on screen or resume the activity which was stopped

onDestroy(): – Any activity is known as in destroyed state when it’s not in background

  1. Learn Android Development
  2. Android Studio
  3. Android UI
  4. Java or Kotlin for Android
  5. Android Activity Life Cycle
  6. Relative Layout
  7. Android Development Elements
  8. XML and Android
  9. JSON and Android
  10. Google Play Store