c# - Accessing items individually in a popup menu for Android -


i'm making simple popup menu android following example xamarin's website http://docs.xamarin.com/guides/android/user_interface/popup_menus/ . popup when clicking on button. i'm interested in though, how each item in popup different, displaying toast or changing layout. have this:

showpopupmenu.click += (s, arg) => {               popupmenu menu = new popupmenu (this, showpopupmenu); menu.inflate (resource.menu.popup_menu);  menu.menuitemclick += (s1, arg1) => {     console.writeline ("{0} selected", arg1.item.titleformatted); };  menu.dismissevent += (s2, arg2) => {     console.writeline ("menu dismissed");  };     menu.show (); 

};

and expect done under menuitemclick, can't figure out write access each individually.

thanks

popupmenu menu = new popupmenu (this,tvemail);         menu.inflate (resource.menu.popup_menu);         menu.menuitemclick += (s1, arg1) => {             switch(arg1.item.titleformatted.tostring())             {             case "edit":                 //edit action here                 break;             } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -