Android Spinner Underline color

By default the Spinner will use the color set via android:textColorSecondary or colorControlNormal in your AppTheme. So either set the appropriate colors there or define a new Theme and apply this one to your Spinner:

Example:

styles.xml

<style name="ThemeSpinner">
    <!-- Color when pressed -->
    <item name="colorAccent">#ffa000</item>
    <!-- Default color for the dropdown arrow and line -->
    <item name="colorControlNormal">#ffc107</item>
</style>

layout.xml

<Spinner
    style="@style/Widget.AppCompat.Spinner.Underlined"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/ThemeSpinner" />

Note: The dropdown arrow will also be tinted - I'm not aware of an option to color the arrow separately


Add this to spinner

android:backgroundTint="@color/gray"