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
:
- Select the
MainActivity.cs
file from Solution Explorer and rename toPOIListActivity.cs
. - Open the
POIListActivity.cs
file in the code editor and rename the class toPOIListActivity
. - 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 thePOIListActivity
class. - 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.