public void OnCreateContextMenu(IContextMenu menu, Android.Views.View v, IContextMenuContextMenuInfo menuInfo) { var collectionView = (YuCollectionView)Element; if (collectionView.MenuContext != null) { var menuContext = collectionView.MenuContext; if (menuContext.ItemsSource != null) { var items = menuContext.ItemsSource; if (!string.IsNullOrEmpty(menuContext.Title)) { menu.SetHeaderTitle(menuContext.Title); } foreach (var item in items) { var menuItem = (MenuItem)item; var mi = menu.Add(0, v.Id, 0, menuItem.Name); mi.SetOnMenuItemClickListener(this); } } } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo info) { base.OnCreateOptionsMenu (menu); menu.SetHeaderTitle("Выберите действие"); menu.Add(0, MENU_ITEM_EDIT, 0, "Редактировать"); menu.Add(0, MENU_ITEM_DELETE, 0, "Удалить"); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.songsListView) { var info = (AdapterView.AdapterContextMenuInfo)menuInfo; selectedSong = songs[info.Position]; menu.SetHeaderTitle(GetSelectedSongTitle()); Drawable picture = SongMetadata.GetSongPicture(selectedSong.Id); if (picture != null) { menu.SetHeaderIcon(picture); } else { menu.SetHeaderIcon(Resource.Drawable.default_song_image); } var inflater = MenuInflater; inflater.Inflate(Resource.Menu.song_actions_menu, menu); if (mediaPlayer.CurrentSong != null && mediaPlayer.IsPlaying && selectedSong.Id == mediaPlayer.CurrentSong.Id) { menu.FindItem(Resource.Id.seek_bar).SetVisible(true); } } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); MenuInflater.Inflate(Resource.Menu.opciones_contextuales, menu); menu.SetHeaderIcon(Resource.Drawable.agregar); menu.SetHeaderTitle("Menu contextual"); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); Android.Widget.AdapterView.AdapterContextMenuInfo info = (Android.Widget.AdapterView.AdapterContextMenuInfo)menuInfo; var password = ((PasswordsListAdapter)ListAdapter).Passwords [info.Position]; var inflater = Activity.MenuInflater; if (!string.IsNullOrEmpty(password.UserName)) { menu.Add(0, 0, 0, "Copy user name"); } if (!string.IsNullOrEmpty(password.Password)) { menu.Add(0, 1, 0, "Copy password"); } if (!string.IsNullOrEmpty(password.Field1)) { menu.Add(0, 2, 0, "Copy field 1"); } if (!string.IsNullOrEmpty(password.Field2)) { menu.Add(0, 3, 0, "Copy field 2"); } menu.SetHeaderTitle(password.Application); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); if (v != null && v.Id == Resource.Id.allTasksListView) { var info = (AdapterView.AdapterContextMenuInfo)menuInfo; IEnumerator <Goal> enumerator = allGoalsCollection.GetEnumerator(); enumerator.Reset(); for (int i = 0; i <= info.Position; i++) { enumerator.MoveNext(); } Goal currentGoal = enumerator.Current; menu.SetHeaderTitle(currentGoal.TaskDescription); // TODO: Handle menu items being clicked string[] menuItems = new string[3] { "Complete", "Edit", "Delete" }; for (var i = 0; i < menuItems.Length; i++) { menu.Add(Menu.None, i, i, menuItems[i]); } } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo info) { base.OnCreateOptionsMenu(menu); menu.SetHeaderTitle("Выберите действие"); menu.Add(0, MENU_ITEM_EDIT, 0, "Редактировать"); menu.Add(0, MENU_ITEM_DELETE, 0, "Удалить"); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo info) { base.OnCreateContextMenu(menu, v, info); menu.SetHeaderTitle(((Sal1050EntityWebGoodSalPrice)listItem.ElementAt(((AdapterView.AdapterContextMenuInfo)info).Position)).FarsiDesc); menu.SetHeaderIcon(Android.Resource.Drawable.IcMenuDelete); //menu.Add(0, 0, 0, GetString(Resource.String.Update)); menu.Add(0, 1, 0, GetString(Resource.String.Delete)); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); menu.SetHeaderTitle("Chức năng"); menu.Add(0, 1, 1, "Sửa"); menu.Add(0, 2, 2, "Xoá"); }
public override void OnCreateContextMenu(IContextMenu menu, View view, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, view, menuInfo); AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo; Tunnel.Client client = listAdapter[info.Position]; menu.SetHeaderTitle("Client " + client.ID + " at " + client.Address); menu.Add(Menu.None, 0, 0, "Throw off"); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.LV_SEARCHRESULT) { menu.SetHeaderTitle(GetString(Resource.String.ListViewItemLongClickHeader)); menu.Add(0, 1, 0, GetString(Resource.String.mapLayout)); menu.Add(0, 2, 1, GetString(Resource.String.shopinfo)); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.expandable_payment_list) { menu.SetHeaderTitle(Strings.SelectOperationLabel); menu.Add(Strings.EditLabel); menu.Add(Strings.DeleteLabel); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); menu.Add("Másol"); menu.Add("Töröl"); menu.Add("Átnevez"); menu.SetHeaderTitle("Fájlműveletek"); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.category_list) { menu.SetHeaderTitle(Strings.SelectOperationLabel); menu.Add(0, 0, 0, Strings.EditLabel); menu.Add(0, 1, 1, Strings.DeleteLabel); } }
/// <summary> /// Creates a context menu with options. /// </summary> public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); menu.SetHeaderIcon(Resource.Drawable.ifx_logo_small); menu.SetHeaderTitle("Options"); menu.Add(0, v.Id, 0, "Raw data"); menu.Add(0, v.Id, 0, "Visualize"); menu.Add(0, v.Id, 0, "Delete"); }
public override void OnCreateContextMenu (IContextMenu menu, View view, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu (menu, view, menuInfo); AdapterView.AdapterContextMenuInfo info =(AdapterView.AdapterContextMenuInfo) menuInfo; Tunnel.Client client = listAdapter[info.Position]; menu.SetHeaderTitle("Client " + client.ID+" at " + client.Address); menu.Add(Menu.None,0,0,"Throw off"); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.accountList) { menu.SetHeaderTitle(Strings.SelectOperationLabel); menu.Add(Strings.EditLabel); menu.Add(Strings.DeleteLabel); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.lstVwBooteAktuell) { var info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.SetHeaderTitle(booteUsedClass[info.Position].Nummer + " ," + booteUsedClass[info.Position].Nummer); menu.Add(Menu.None, 0, 0, "Löschen"); menu.Add(Menu.None, 1, 1, "Wieder da"); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); // TODO: Is this required?? AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo; if (v.Id == Resource.Id.uuidlistviewAPI) { menu.SetHeaderTitle(mUUIDList[info.Position]); menu.Add(mAPISpaceMenuStrings[0]); menu.Add(mAPISpaceMenuStrings[1]); menu.Add(mAPISpaceMenuStrings[2]); } if (v.Id == Resource.Id.uuidlistviewApplicationSpace) { menu.SetHeaderTitle(mAppSpaceUUIDList[info.Position]); menu.Add(mAppSpaceMenuStrings[0]); menu.Add(mAppSpaceMenuStrings[1]); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); m_EditTaskPosition = ((AdapterView.AdapterContextMenuInfo)menuInfo).Position; menu.SetHeaderTitle(m_AllTasks[m_EditTaskPosition].Task); MenuInflater.Inflate(Resource.Menu.ContextMenuHistoryTask, menu); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { var info = (AdapterView.AdapterContextMenuInfo)menuInfo; var conversation = _adapter[info.Position]; menu.SetHeaderTitle(conversation.DisplayName); menu.Add(FRAGMENT_GROUP_ID, MENU_CONVERSATION_HIDE, MENU_CONVERSATION_HIDE, "ConversationHide".t()); menu.Add(FRAGMENT_GROUP_ID, MENU_DELETE_ALL, MENU_DELETE_ALL, "ConversationClearAllMessages".t()); menu.Add(FRAGMENT_GROUP_ID, MENU_TAKEBACK_ALL, MENU_TAKEBACK_ALL, "ConversationTakeBackAllMessages".t()); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); if (selectedMap != null) { menu.SetHeaderTitle(selectedMap.GetLocalizedName(localeSettings)); menu.Add(0, (int)ContextItems.Delete, (int)ContextItems.Delete, "Delete"); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); if (v == _text) { MenuInflater.Inflate(Resource.Menu.context_menu, menu); menu.SetHeaderTitle(new Java.Lang.String("Favorite browser?")); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); m_EditTaskPosition = ((AdapterView.AdapterContextMenuInfo)menuInfo).Position; menu.SetHeaderTitle(m_AllTasks[m_EditTaskPosition].Task); MenuInflater.Inflate(Resource.Menu.ContextMenuTask, menu); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); var info = (Android.Widget.AdapterView.AdapterContextMenuInfo)menuInfo; var process = ((ProcessListAdapter)ListAdapter).Processes [info.Position]; menu.Add("Kill"); menu.SetHeaderTitle(process.Name); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); if (v == _text) { MenuInflater.Inflate(Resource.Menu.context_menu, menu); menu.SetHeaderTitle(new Java.Lang.String("Favorite browser?")); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); if (v == listViewType) { MenuInflater inflater = this.MenuInflater; inflater.Inflate(Resource.Menu.listview_type_menu, menu); menu.SetHeaderTitle("Action"); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); if (v == listViewEntry) { MenuInflater inflater = ((MainActivity)ParentContext).MenuInflater; inflater.Inflate(Resource.Menu.listview_type_menu, menu); menu.SetHeaderTitle("Action"); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == RollifyAndroid.Resource.Id.formulaListView) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.SetHeaderTitle (formulaAdapter [info.Position].Name); String[] menuItems = {"Use", "Edit", "Delete" }; for (int i = 0; i < menuItems.Length; i++) { menu.Add (Menu.None, i, i, menuItems [i]); } } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); var info = (AdapterView.AdapterContextMenuInfo)menuInfo; var id = (int)info.Id; menu.SetHeaderTitle("Options".ToJ()); menu.Add(0, id, 1, "Rename".ToJ()); menu.Add(0, id, 2, "Delete".ToJ()); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); var info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.SetHeaderTitle(((TextView)info.TargetView).Text); menu.Add(0, MenuIdRename, 0, Resource.String.gestures_rename); menu.Add(0, MenuIdRemove, 0, Resource.String.gestures_delete); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); var info = (AdapterView.AdapterContextMenuInfo)menuInfo; var id = (int)info.Id; menu.SetHeaderTitle("Options".ToJ()); menu.Add(0, id, 1, "Rename".ToJ()); menu.Add(0, id, 2, "Delete".ToJ()); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.resultListView && queryFeature != null) { menu.SetHeaderTitle("Options"); menu.SetHeaderIcon(Android.Resource.Drawable.IcMenuInfoDetails); menu.Add(0, Menu.First + 1, 1, "Center at").SetIcon(Android.Resource.Drawable.IcMenuInfoDetails); menu.Add(0, Menu.First + 2, 2, "Zoom to").SetIcon(Android.Resource.Drawable.IcMenuInfoDetails); } base.OnCreateContextMenu(menu, v, menuInfo); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); if (v == ListView) { var info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.SetHeaderTitle(ViewModel.Places[info.Position].Name); menu.Add(Menu.None, 0, 0, Strings.EDIT); menu.Add(Menu.None, 1, 1, Strings.DELETE); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id != Resource.Id.MyFriendsListView) return; info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.SetHeaderTitle(Resource.String.ContextMenuTitle); var menuItems = Resources.GetStringArray(Resource.Array.ContextMenu); for (var i = 0; i < menuItems.Length; i++) { menu.Add(Menu.None, i, i, menuItems[i]); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo info) { var menuInfo = (AdapterView.AdapterContextMenuInfo)info; var safetyCheckItem = ((SafetyCheckItemViewModel)((MvxListItemView)menuInfo.TargetView).DataContext); menu.SetHeaderTitle(safetyCheckItem.Title); foreach (var status in safetyCheckItem.AvailableStatuses) { menu.Add(0, (int)status.Key, 0, status.Value); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); var info = (Android.Widget.AdapterView.AdapterContextMenuInfo)menuInfo; var client = ((ClientListItem_Adapter)ListAdapter).GetClientFromPosition(info.Position); menu.Add(0, 0, 0, "Log in"); menu.Add(1, 1, 0, "Make Admin"); menu.Add(1, 2, 0, "Uninstall"); menu.Add(1, 3, 0, "Kill"); menu.SetHeaderTitle(client.UserName); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); menu.SetHeaderTitle("Տվյալներ"); if (ChildData != null) { menu.Add(0, v.Id, 0, ChildData[0]); menu.Add(0, v.Id, 0, ChildData[1]); menu.Add(0, v.Id, 0, ChildData[2]); } ChildData = null; }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu(menu, v, menuInfo); var info = (AdapterView.AdapterContextMenuInfo)menuInfo; var tag = info.TargetView.Tag; if (tag == null) return; var selectedPositionId = int.Parse(tag.ToString()); menu.SetHeaderTitle("Options".ToJ()); foreach (var contextItem in _presenter.GetContextItems()) { menu.Add(0, selectedPositionId, contextItem.Order, contextItem.Title.ToJ()); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo info) { menu.SetHeaderTitle("Context Menu"); menu.Add(0, 0, 0, "Text version 1"); menu.Add(0, 1, 0, "Text version 2"); }
public override void OnCreateContextMenu (IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.NoteList) { var info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.SetHeaderTitle (notes[info.Position].Name); selectedId = notes[info.Position].ID; menu.Add(0,0,0,"Edit"); menu.Add(0,1,0,"Delete"); } }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { MenuInflater inflater = getMenuInflater(); long noteId = ((AdapterContextMenuInfo)menuInfo).id; dialogPosition = ((AdapterContextMenuInfo)menuInfo).position; Uri intentUri = Uri.Parse(Tomdroid.CONTENT_URI+"/"+noteId); dialogNote = NoteManager.getNote(this, intentUri); if(dialogNote.getTags().Contains("system:deleted")) inflater.Inflate(Resource.menu.main_longclick_deleted, menu); else inflater.Inflate(Resource.menu.main_longclick, menu); menu.SetHeaderTitle(GetString(Resource.String.noteOptions)); base.OnCreateContextMenu(menu, v, menuInfo); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu (menu, v, menuInfo); Logging.Log (this, Logging.LoggingTypeDebug, "OnCreateContextMenu()"); selectedLongClickItemPosition = ((AdapterView.AdapterContextMenuInfo)menuInfo).Position; menu.SetHeaderTitle(Resource.String.PresentationsMenuTitle); menu.Add(0, (int)PresentationsMenu.Start, 0, Resource.String.PresentationsMenuStart); menu.Add(0, (int)PresentationsMenu.Create, 1, Resource.String.PresentationsMenuCreate); menu.Add(0, (int)PresentationsMenu.Rename, 2, Resource.String.PresentationsMenuRename); menu.Add(0, (int)PresentationsMenu.Delete, 3, Resource.String.PresentationsMenuDelete); menu.Add(0, (int)PresentationsMenu.ShowFolder, 4, Resource.String.PresentationsMenuShowFolder); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { base.OnCreateContextMenu (menu, v, menuInfo); //capture the selected item's position in the list _position = ((AdapterView.AdapterContextMenuInfo) menuInfo).Position; Activity.MenuInflater.Inflate (Resource.Menu.sms_context_menu, menu); menu.SetHeaderTitle ("SMS Group Options"); menu.SetHeaderIcon (Resource.Drawable.ic_menu_sms_context_header); }
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo) { if (v.Id == Resource.Id.listCalendar) { var info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.SetHeaderTitle("Event Options"); var menuItems = Resources.GetStringArray(Resource.Array.eventdetailsmenu); for (var i = 0; i < menuItems.Length; i++) menu.Add(Menu.None, i, i, menuItems[i]); } }