O'Reilly logo

Creating Dynamic UI with Android Fragments by Jim Wilson

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

Chapter 1. Fragments and UI Modularization

This chapter introduces fragments, UI modularization, and the role fragments play in developing a modularized UI. The chapter demonstrates creating simple fragments and using fragments statically within activities.

Let us have a look at the topics to be covered:

  • The need for UI modularization
  • Fragments are the foundation of modularization
  • Support for fragments across Android versions
  • Creating fragments

By the end of this chapter, we will be able to create and use fragments within a static activity layout.

The need for a new approach to UI creation

Chances are that the first class you learned to use when you became an Android developer was the Activity class. After all, the Activity class provided your app with ...

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