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
PreferenceFragment. You will learn to ...