Android Basics – Learn about the Fragment Lifecycle

By now you should be familiar with the Activity Lifecycle looks like. If not don’t worry in this short video I will recap thatĀ also.

The Fragment Lifecycle is quite similar to the Activity Lifecycle. If you observe you will find that the Fragment has five more Lifecycle events.

The difference is at the time of Creation and when the Fragment gets destroyed.

Android Basics – Learn about onPause and onResume methods in Activity Lifecycle

This Article assumes that You are familiar with the Activity Lifecycle. If not please read my last Post.

There are two more methods which come into picture when an Activity becomes partially visible.

These two Lifecycle methods are onPause and onResume. Please refer to the image and to the Video to understand this better.

Android Basics – What is the Activity Lifecycle

Android Activity follows a Lifecycle from its time of creation till it gets destroyed. In this Article you will Learn about the Lifecycle.

As you can see in the attached diagram an Activity starts when its Launched. That’s the time its Constructor is run and object is created.

This is followed by the onCreate method which is responsible for Screen setup.

Continue reading “Android Basics – What is the Activity Lifecycle”