Fragments in android
-
Hello Every1, Can any body tell me regarding fragments?? I did 1 example from Vogella.com but in this both activity shows on same screen in both modes, can you provide some link or matter to clear this concept?? Thanks in Advance
-
Hello Every1, Can any body tell me regarding fragments?? I did 1 example from Vogella.com but in this both activity shows on same screen in both modes, can you provide some link or matter to clear this concept?? Thanks in Advance
-
Hello Every1, Can any body tell me regarding fragments?? I did 1 example from Vogella.com but in this both activity shows on same screen in both modes, can you provide some link or matter to clear this concept?? Thanks in Advance
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.