Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. Fragments in android

Fragments in android

Scheduled Pinned Locked Moved Mobile
androidcomtutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hctm anjaana
    wrote on last edited by
    #1

    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

    R A 2 Replies Last reply
    0
    • H hctm anjaana

      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

      R Offline
      R Offline
      RobCroll
      wrote on last edited by
      #2

      Have you read this[^] I find fragments a bit of a pain as well, but if you're building a tabbed application, you don't have an option. On the good side they provide reusable components

      "You get that on the big jobs."

      1 Reply Last reply
      0
      • H hctm anjaana

        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

        A Offline
        A Offline
        Anas Al Salool
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups