2. What is a fragment?
A fragment is, as the name suggests, a chunk
of user interface with its own lifecycle which
must exist within an activity.
Multiple fragments can be used in a single
activity to form a multi-pane UI or reuse a
fragment in multiple activities.
3. Advantages of fragments
• It can modularize a single activity into
smaller units of UI, making it more flexible
and easier to manage.
• A fragment can exist without a UI screen
and act as an invisible worker for the activity.
• A fragment can be reused with multiple
activities.
• A fragment lets us maintain a "back-stack" of
its state.
12. Compatibility (contd.)
To use the compatibility package, you must add
it to your project and include in the build path.
This can be done by Right clicking your Android
project-> Selecting Android Tools-> Add
compatibility Library.