Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created December 27, 2010 19:06
Show Gist options
  • Select an option

  • Save mgroves/756430 to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/756430 to your computer and use it in GitHub Desktop.
Monodroid options menu
public override bool OnCreateOptionsMenu(IMenu menu)
{
var item = menu.Add(0,1,1,"Refresh");
item.SetIcon(Resource.drawable.ic_menu_refresh);
return true;
}
public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.Title.ToS())
{
case "Refresh": Refresh();
return true;
default:
return base.OnOptionsItemSelected(item);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment