Defining the menu XML file

Actions can be defined in a menu XML file that resides in the Resources/menu folder, or it can be created programmatically using API calls. We will define the New and Refresh actions in an XML file named POIListViewMenu.xml.

To create POIListViewMenu.xml, perform the following steps:

  1. Select the Resources folder in POIApp, right-click on it, and navigate to Add | New Folder.
  2. Name the folder menu.
  3. Select the menu folder, right-click on it, and navigate to Add | New File.
  4. Navigate to XML | Empty XML file, enter POIListViewMenu.xml for the name, and click on New.

You now need to fill in the definitions for the two actions we identified. Unfortunately, Xamarin Studio does not contain a template for menu XML files, so you have to ...

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.