Setting menus in OnCreateOptionsMenu()
The OnCreateOptionsMenu()
method is called to give an opportunity to the Activity
parameter to define actions for the ActionBar
. The Activity
class provides a MenuInflater
method, which reads the XML definition file and places the action defined on the ActionBar. The following code shows the implementation from the code bundle:
public override bool OnCreateOptionsMenu(IMenu menu) { MenuInflater.Inflate(Resource.Menu.POIListViewMenu, menu); return base.OnCreateOptionsMenu(menu); }