Esempio n. 1
0
        private void ShowPopupMenu(int itemPosition)
        {
            _participantsAdapter.SelectedItem = _participantsAdapter.Items[itemPosition];

            PopupMenu menu = new PopupMenu(this, _participantsRecyclerView.FindViewHolderForAdapterPosition(itemPosition).ItemView);
            menu.SetOnMenuItemClickListener(this);
            menu.SetOnDismissListener(this);
            menu.Inflate(Resource.Menu.ParticipantsPopup);
            menu.Show();
        }
Esempio n. 2
0
        private static void ShowPopupMenu(object sender, ListItemEventArgs args, RecyclerView rv, ContactFragment cf)
        {
            ListItemAdapter adapter = (ListItemAdapter) sender;
            adapter.SelectedItem = adapter.Items[args.Position];

            PopupMenu menu = new PopupMenu(cf.Activity, rv.FindViewHolderForAdapterPosition(args.Position).ItemView);
            menu.Menu.Add(0, 0, 0, "Remove this contact");
            menu.SetOnMenuItemClickListener(cf);
            menu.SetOnDismissListener(cf);
            menu.Show();
        }
Esempio n. 3
0
        private static void ShowPopupMenu(object sender, ListItemEventArgs args, RecyclerView rv, AddContactsScherm acs)
        {
            ListItemAdapter adapter = (ListItemAdapter) sender;
            adapter.SelectedItem = adapter.Items[args.Position];

            PopupMenu menu = new PopupMenu(acs, rv.FindViewHolderForAdapterPosition(args.Position).ItemView);
            menu.Menu.Add(0, 0, 0, "Add this user");
            menu.SetOnMenuItemClickListener(acs);
            menu.SetOnDismissListener(acs);
            menu.Show();
        }