• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Activity Life Cycle Methods Query

 
Sangel Kapoor
Ranch Hand
Posts: 157
1
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone

Quote from Android developer site is as follows

onStart() Called just before the activity becomes visible to the user.

Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.


It seems like the Activity Lifecycle methods can take the following two paths

1. onCreate() --> onStart() --> onResume() : Normal Scenario

2. onCreate() --> onStart() ---> onStop() : When can this happen ??


 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually when you do something in the onCreate() or onStart() that shows something on top of the current Activity (such as showing another Activity). But also if the user switches applications, a phone call comes in, or anything else happens that interrupts the normal flow.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic