A
A
Alexander2014-04-21 14:05:22
Android
Alexander, 2014-04-21 14:05:22

How to change the color of the shadow and "divider" of the Spinner in Android?

How to change color of shadow and divider in Spinner on API10? For API14 I change like this:

<style name="SpinnerDefaultTheme" parent="android:style/Widget.ListView.DropDown">
        <item name="android:textColor">#F8F7F6</item>
        <item name="android:cacheColorHint">#414141</item>
    	<item name="android:divider">#2B2B2B</item>
    	<item name="android:dividerHeight">1dp</item>
</style>

Tried doing this but it doesn't work
<style name="SpinnerItemDefaultTheme" parent="android:style/Widget.TextView.SpinnerItem">
  <item name="android:textColor">#F8F7F6</item>
        <item name="android:cacheColorHint">#414141</item>
    	<item name="android:divider">#2B2B2B</item>
    	<item name="android:dividerHeight">1dp</item>
</style>

Here is the theme builder:
<style name="DefaultTheme" parent="@style/_DefaultTheme"/>
<style name="_DefaultTheme" parent="android:Theme.Holo.Light">
        <item name="android:spinnerItemStyle">@style/SpinnerItemDefaultTheme</item>
        <item name="android:dropDownListViewStyle">@style/SpinnerDefaultTheme</item>
</style>

The color of the shadow that is above and below the list is white instead of #414141 and the divider is also white, how can I fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question