Chapter 19. Using Multiple Fragments
Now that we have discussed the principals of MVC as well as seen how to implement a Fragment, we can take things a stage further. You will learn how to separate the data layer using a Java singleton and then we will see how Fragments can communicate with each other.
Once we have achieved both of these things, we can implement our first multi-Fragment, orientation-aware app that will put everything we know so far into practice.
Note
In this chapter, to save digital ink, I will stop giving specific instructions on how to make classes and layout files. As a reminder, to create a new class, right-click on the folder that contains all the .java
files and navigate to New | Class. Type the name and click on OK. To create ...
Get Android Programming for Beginners 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.