Design + Code an Android App from Scratch
This video talks about Fragments in Android. Fragments are like mini-activities that can be used to display chunks of the UI. On a smaller device like a phone, the Fragments may be displayed one per Activity. On a larger device like a tablet, the Fragments may be displayed right beside each other. Fragments have their own lifecycle which runs in parallel with the Activity’s lifecycle. The onAttach, onCreate, onCreateView, onActivityCreated, onStart, onResume, onPause, onStop, onDestroyView, onDetach are some of the methods in the lifecycle of a Fragment.