Spinner Dropdown Issue


I am creating an spinner in toolbar, but it seems like the spinner is disabled, no events are fired on ItemClick event of spinner. Snippet is

protected override void OnCreate (Bundle bundle)
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.main);

            var toolbar = FindViewById<Android.Support.V7.Widget.Toolbar> (Resource.Id.toolbar);

            SetSupportActionBar (toolbar);

            SupportActionBar.SetDisplayShowTitleEnabled (true);

            SupportActionBar.NavigationMode = Android.Support.V7.App.ActionBar.NavigationModeList;

            var spinnerAdapter = ArrayAdapter.CreateFromResource (this, Resource.Array.intervals, Android.Resource.Layout.SimpleSpinnerItem);
            spinnerAdapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
            SupportActionBar.SetListNavigationCallbacks (spinnerAdapter, this);

What I am missing?

Sign In or Register to comment.