O'Reilly logo

Android UI Design by Jessica Thornsby

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

Working with fragments

When you're developing your UI for pre-Android N devices, one of the major restrictions you'll encounter is that you can only ever display a single activity on the screen at any one time. Fragments give you a way to overcome this restriction; although technically you can still only display one activity at a time; each activity can consist of multiple fragments.

Note

Android N introduced multi-window mode, which gives users the ability to display more than one app at a time, allowing them to see multiple activities at once, albeit from different applications! We'll take a closer look at multi-window mode later in this chapter.

A fragment is a self-contained, modular section of your app's user interface that you embed inside ...

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