Created
May 31, 2013 11:15
-
-
Save Cheesebaron/5684336 to your computer and use it in GitHub Desktop.
Quick and dirty menu item.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override bool OnCreateOptionsMenu(IMenu menu) | |
{ | |
var item = menu.Add(0,1,1,"Back"); | |
//If you want an icon set it here | |
item.SetIcon(Resource.drawable.ic_menu_back); | |
return true; | |
} | |
public override bool OnOptionsItemSelected(IMenuItem item) | |
{ | |
switch (item.ItemId) | |
{ | |
case 1: Back(); | |
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