Book Image

Xamarin Mobile Application Development for Android, Second Edition

Book Image

Xamarin Mobile Application Development for Android, Second Edition

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

Creating POIDetailActivity


Now that we have the POIDetail layout ready, we need a corresponding activity. Perform the following steps to create a new activity for the POI details:

  1. With the POIApp project selected in the Solution pad, right-click on it and navigate to Add | New File.

  2. In the New File dialog, click on Android and select Activity, enter POIDetailActivity as Name, and click on New.

As you may recall from Chapter 3, Creating the Points Of Interest App, one of the first things that needs to be done when an activity is created is to set the layout content, which is accomplished by calling SetContentView(layoutId). Add the following line of code to the OnCreate() method of the POIDetailActivity:

SetContentView (Resource.Layout.POIDetail);