Find the best answer to your question, help others answer theirs

If you are going to use a passage of Lorem Ipsum, you need to be sure there
isn't anything embarrassing hidden in the middle of text.

  • Anybody can ask a question
  • Anybody can answer
  • The best answers are voted up and rise to the top
Lifecycle of an Activity
Asked 5 वर्ष पहले
Viewed 712 times

1 Answer

2
  • OnCreate(): This is when the view is first created. This is normally where we create views, get data from bundles etc.
  • OnStart(): Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.
  • OnResume(): Called when the activity will start interacting with the user. At this point your activity is at the top of the activity stack, with user input going to it.
  • OnPause(): Called as part of the activity lifecycle when an activity is going into the background, but has not (yet) been killed.
  • OnStop(): Called when you are no longer visible to the user.
  • OnDestroy(): Called when the activity is finishing
  • OnRestart(): Called after your activity has been stopped, prior to it being started again
Edit
avatar
Majed Badawi
15.5k 3 10 26
answered 8 hours ago

Leave a Comment

[named hyperlinks] (https://example.com)
**bold**
_italic_

Your Answer

Drop files here or click to upload.