Posts

Showing posts from September, 2012

Fragment

Image
 What’s a Fragment? A  fragment  is a class implementing a portion of an activity. A fragment represents a particular operation or interface running within a larger activity. Fragments enable more modular activity design, making it easier to adapt an application to different screen orientations and multiple screen sizes. Fragments must be embedded in activities; they cannot run independent of activities. Most fragments define their own layout of views that live within the activity’s view hierarchy. However, a fragment can implement a behavior that has no user interface component. A fragment has its own lifecycle, closely related to the lifecycle of its host activity. A fragment can be a static part of an activity, instantiated automatically during the activity’s creation. Or, you can create, add, and remove fragments dynamically in an activity at run-time. Fragments: Implemented in Honeycomb (3.0) or Later Fragments were added to the And