Spinner.ItemLongClick, doesn't seem to register...

JPHochbaumJPHochbaum ✭✭✭USMember ✭✭✭
edited December 2016 in Xamarin.Android

In my OnCreate:

this.spinner.ItemSelected += Spinner_ItemSelected; this.spinner.ItemLongClick += Spinner_ItemLongClick;

Spinner.ItemSelected works great! Spinner.ItemLongClick seems to not work at all.

I assume it is supposed to register on a long click and hold on a spinner item, and I tested it numerous times and it doesn't enter my event handler during debug mode.

Am I missing something here?

`private void Spinner_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
RunOnUiThread(() =>
if (this.spinner.SelectedItemPosition > 0)
string selectedItemText = this.spinner.SelectedItem.ToString();
PopupMenu menu = new PopupMenu(this, this.spinner);
menu.MenuInflater.Inflate(Resource.Menu.popUp, menu.Menu);

                menu.MenuItemClick += (s, arg) =>
                    var x = 1;
Sign In or Register to comment.