9.3 Technologies Overview
This section introduces the features you’ll use to build the Address Book app.
9.3.1 Displaying Fragment
s with FragmentTransaction
s
In earlier apps that used Fragment
s, you declared each Fragment
in an Activity
’s layout or, for a DialogFragment
, called its show
method to create it. The Flag Quiz app demonstrated how to use multiple activities to host each of the app’s Fragment
s on a phone device, and a single Activity
to host multiple Fragment
s on a tablet device.
In this app, you’ll use only one Activity
to host all of the app’s Fragment
s. On a phone-sized device, you’ll display one Fragment
at a time. On a tablet, you’ll always display the Fragment
containing the contact list and display the Fragment
s for viewing, ...
Get Android How to Program, 3/e 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.