2. Fragments

This chapter is focused on understanding fragments. So that Android applications are more manageable, they are often divided into fragments. Having their own independent user interface, fragments can be easily added or removed from an application, making it suitable to different screen sizes. In this chapter, you will learn about the use of fragments, their life cycle, and how they are practically applied in Android applications. You will also see how fragments can be added dynamically to an application through Java code. In addition to this, you will learn how data is communicated among two fragments. The chapter will explain using the specialized fragments ListFragment, DialogFragment, and PreferenceFragment. You will learn to ...

Get The Android™ Tablet Developer’s Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.