O'Reilly logo

Introduction to Android™ Application Development: Android Essentials, Fifth Edition by Shane Conder, Lauren Darcey, Joseph Annuzzi Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9. Partitioning with Fragments

Traditionally, each screen within an Android application was tied to a specific Activity class. However, in Android 3.0 (Honeycomb), the concept of a Fragment was introduced. Fragments were then included in the Android Support Library for use with Android 1.6 (API Level 4) and up. Fragments decouple user interface components or behaviors (without a user interface) from a specific Activity lifecycle. Instead, Activity classes can mix and match user interface components or behaviors to create more flexible user interfaces. This chapter explains what fragments are and how you can use them. We also introduce the concept of nested fragments.

Understanding Fragments

Fragments were added to the Android SDK at a crucial ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required