Fragments

Fragments were discussed in Chapter 4, “Android Navigation and Interface Design.” The FragmentActivity is a subclass of the Activity class. An Activity that needs to implement a map must extend the FragmentActivity class rather than the Activity class. This is required because maps are encapsulated in a MapFragment. This allows a map to be a part of a layout rather than the only thing in a layout.

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android 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.