an activity typically fi lls the entire screen, displaying the various views that make up the user interface of an application. The activity is essentially a container for views. However, when an activity is displayed in a large-screen device, such as on a tablet, it is somewhat out of place. Because the screen is much bigger, all the views in an activity must be arranged to make full use of the increased space, resulting in complex changes to the view hierarchy. A better approach is to have “mini-activities,” each containing its own set of views. During runtime, an activity can contain one or more of these mini-activities, depending on the screen orientation in which the device is held. In Android 3.0 and later, these mini-activities are known as fragments . Think of a fragment as another form of activity. You create fragments to contain views, just like activities. Fragments are always embedded in an activity. For example, Figure 2-15 shows two fragments. Fragment 1 might contain a ListView showing a list of book titles. Fragment 2 might contain some TextView s and ImageViews showing some text and images. For More detials i recommend you to explore this book : Professional Android Application Development book reviews[^] you will find all the details about fragments in the page 69 with code examples.
A
Anas Al Salool
@Anas Al Salool
Posts
-
Fragments in android -
Which platform used most in android to build app??Eclips is the integrated development environment (IDE) for developing your Android applications. For more detials check this article : Build Your Own App With Android Developer Tools[^]