Activity : An activity represents visible component of android. It is used by an application developer to interact with end user.
Android framework provides a class by the name android.app.Activity this class provides us life cycle method of activity these methods are override by application developer to perform there tasks. An application developer can use this class by defining sub class of activities.
The life cycle of activity can be divided in three state:
1. Active State
2. Visible State
3. Inactive State/Invisible State
Active State : An active state of an activity represents activity is visible as well as it has user focus. The life cycle of this state is managed by onResume() and onPause() life cycle method of activity.
Visible State : Visible sate of activity represents that activity is visible it don't have user focus life cycle of this state is managed by onStart() and onStop() life cycle method of activity.
Inactive State/Invisible State : The invisible state of activity represents that niether activity is visible nor it have user focus. Life cycle of this state is managed by onCreate() and onDestroy() life cycle method of activity.
Android framework provides a class by the name android.app.Activity this class provides us life cycle method of activity these methods are override by application developer to perform there tasks. An application developer can use this class by defining sub class of activities.
The life cycle of activity can be divided in three state:
1. Active State
2. Visible State
3. Inactive State/Invisible State
Active State : An active state of an activity represents activity is visible as well as it has user focus. The life cycle of this state is managed by onResume() and onPause() life cycle method of activity.
Visible State : Visible sate of activity represents that activity is visible it don't have user focus life cycle of this state is managed by onStart() and onStop() life cycle method of activity.
Inactive State/Invisible State : The invisible state of activity represents that niether activity is visible nor it have user focus. Life cycle of this state is managed by onCreate() and onDestroy() life cycle method of activity.
Activity Life cycle
0 Comments:
Post a Comment