Creating POIListActivity

When we created the POIApp solution, along with the default layout, a default activity (MainActivity.cs) was created. Let's rename the MainActivity.cs file to POIListActivity.cs:

  1. Select the MainActivity.cs file from Solution Explorer and rename to POIListActivity.cs.
  2. Open the POIListActivity.cs file in the code editor and rename the class to POIListActivity.
  3. The POIListActivity class currently contains the code that was created automatically while creating the solution using Xamarin Studio. We will write our own activity code, so let's remove all the code from the POIListActivity class.
  4. Override the OnCreate() activity life cycle callback method. This method will be used to attach the activity layout, instantiate the views, ...

Get Xamarin Mobile Application Development for Android - Second Edition 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.