5.10. Wrap-Up
In this chapter, you built a Flag Quiz app that tests a user’s ability to correctly identify country flags. A key feature of this chapter was using Fragments to create portions of an Activity’s GUI. You used two activities to display the QuizFragment and the Settings-Fragment when the app was running in portrait orientation, and one Activity to display both Fragments when the app was running on a tablet in landscape orientation—thus, making better use of the available screen real estate. You used a subclass of PreferenceFragment to automatically maintain and persist the app’s settings and a subclass of DialogFragment to display an AlertDialog to the user. We discussed portions of a Fragment’s lifecycle and showed how to use the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access