Amitai Rosenberg
- Forum posts: 27
Aug 20, 2016, 8:13:05 PM via Website
Aug 20, 2016 8:13:05 PM via Website
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?
Thanks.
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.