I'm trying to create a spinner with some background color and dropdownicon.But whenever i'm applying the background color the dropdown icon disappers.So how to have Spinner with dropdown icon & with different background color. Please have a look on the xml that i'm trying below:
Expected OutPut:
Getting (without drop down icon)
Background removed then i'm getting the following output:
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:layout_weight="8"
android:padding="@dimen/dp_8"
app:cardElevation="@dimen/dp_5">
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/appCompatSpinner"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:entries="@array/clubName"
android:textAlignment="center"
android:spinnerMode="dropdown"
android:background="@color/colorPrimary_blue"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</android.support.v7.widget.AppCompatSpinner>
</android.support.v7.widget.CardView>
Create .xml Class and write this coad.
Simple workaround to this just wrap your spinner in framelayout and set the background color of layout of your choice