I using listviews and expandedviews that has dividers and I can set them but on spinner its looks like it is no divider between items.
Someone that has a idea of how to fix this?
This worked for me:
<style name="SpinnerStyle" parent="Widget.AppCompat.ListView.DropDown">         <item name="android:divider">#d1d1d1</item>         <item name="android:dividerHeight">0.5dp</item>     </style>  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">         <!-- Customize your theme here. -->         <item name="android:dropDownListViewStyle">@style/SpinnerStyle</item> The advantage of using this is that it doesn't remove the ripple effect on hover.
I managed to find a more proper solution for this issue (without including the divider in the single item layout).
What you have to do is define in your activity's theme
        <item name="android:dropDownListViewStyle">@style/App.Style.Spinner</item> and then create the proper style with
   <style name="App.Style.Spinner" parent="@style/Widget.Sherlock.Light.ListView.DropDown">            <item name="android:dividerHeight">10dip</item>            <item name="android:divider">@drawable/mydivider</item>    </style> If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With