Android Spinner in Toolbar Arrow

AmitaiRosenbergAmitaiRosenberg USMember ✭✭

I want to have a Spinner in my Toolbar. However, the Spinner doesn't have any dropdown arrow, as the default Android Spinner does.

How do I make it have an arrow?

This is my code:

<android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="104dp" android:gravity="top" app:titleTextColor="@color/White" android:layout_gravity="right" android:layoutDirection="rtl" app:layout_scrollFlags="scroll|enterAlways" app:layout_collapseMode="pin" app:contentScrim="?attr/colorPrimary" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:titleMarginTop="15dp"> <Spinner android:id="@+id/Location_Spinner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp"/>

Fragment where I show the spinner:

var spinner = Activity.FindViewById<Spinner>(Resource.Id.Location_Spinner); var adapter = ArrayAdapter.CreateFromResource(Activity, Resource.Array.locations_array, Android.Resource.Layout.SimpleSpinnerItem); adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); spinner.Adapter = adapter;

Any ideas why there isn't an arrow?

Sign In or Register to comment.