What is lifecycle of an Activity?
Submitted by: Muhammad☛ 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
Submitted by: Muhammad
☛ 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
Submitted by: Muhammad
Read Online Android Developer Job Interview Questions And Answers
Top Android Developer Questions
☺ | Explain me what is Context? |
☺ | Explain me what is the Android Application Architecture? |
☺ | Explain me scenario in which only onDestroy is called for an activity without onPause() and onStop()? |
☺ | Explain me how does the activity respond when the user rotates the screen? |
☺ | What are content providers? |
Top Mobile Technologies Categories
☺ | Android Interview Questions. |
☺ | Wireless Communication Interview Questions. |
☺ | 3G Interview Questions. |
☺ | iPhone Interview Questions. |
☺ | Mobile App Architect Interview Questions. |