What are fragments
Description
In a small-screen device, an activity typically fills the entire screen. And the activity is a container for views.
To better organize UI on a tablet we can use "mini-activities". Each mini-activities contains its own set of views.
An activity can contain one or more of these mini-activities. These mini-activities are known as fragments.
Fragments can contain views, just like activities. And fragments are always embedded in an activity.
Fragments form the atomic unit of your user interface, and they can be dynamically added or removed to activities.
We can think of the concept of a fragment in Android as the panel in a Desktop user interface.