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 the PointOfInterest apps entity class


The first class that is needed is the one that represents the primary focus of the application, a PointofInterest class. POIApp will allow the following attributes to be captured for the Point Of Interest app:

  • Id

  • Name

  • Description

  • Address

  • Latitude

  • Longitude

  • Image

The POI entity class can be nothing more than a simple .NET class, which houses these attributes.

To create a POI entity class, perform the following steps:

  1. Select the POIApp project from the Solution Explorer in Xamarin Studio. Select the POIApp project and not the solution, which is the top-level node in the Solution pad.

  2. Right-click on it and select New File.

  3. On the left-hand side of the New File dialog box, select General.

  4. At the top of the template list, in the middle of the dialog box, select Empty Class (C#).

  5. Enter the name PointOfInterest and click on OK. The class will be created in the POIApp project folder.

  6. Change the visibility of the class to public and fill in the attributes...