Book Image

Xamarin Mobile Application Development for Android

Book Image

Xamarin Mobile Application Development for Android

Overview of this book

Table of Contents (18 chapters)
Xamarin Mobile Application Development for Android Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Making POIApp compatible with Android tablets


We have already covered a lot of ground on the fragment basics and life cycle in Chapter 1, The Anatomy of an Android App. I recommend that you read the concepts if you haven't gone through them already. Let's now go through the steps to create and manage fragments and build the POIApp to support the multi-pane tablet layout.

Currently, the POIApp is using two activities: POIListActivity for displaying the list of POIs, and POIDetailsActivity for displaying the details. Now we will create two new fragments: POIListFragment and POIDetailFragment, which will be reused for both the smart phone and multi-pane tablet layout:

Notice the following points in the preceding screenshot, which will be implemented in the rest of the sections in this chapter:

  1. The phone layout contains two activities; POIListActivity and POIDetailsActivity, that host POIListFragment and POIDetailFragment respectively. Here, the activities will work like placeholders to hold fragments...