O'Reilly logo

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

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 the User Interface 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 user interface component called 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 behavior from a specific Activity lifecycle. Instead, Activity classes can mix and match user interface components to create more flexible user interfaces for the Android devices of the future. You will also be introduced to the concept of nested fragments which have been added to Android 4.2.

Understanding Fragments

Fragments were added to the Android ...

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