How to change the default divisor color for all ListViews

I am trying to apply the default style for all listViews from style.xml

Note that in some places I use nested listViews.

In style.xml

<style name="Theme.MyTheme" parent="Theme.Sherlock.Light.ForceOverflow"> <item name="android:windowContentOverlay">@null</item> <item name="android:listViewStyle">@style/awesomeListViewStyle</item> </style> <style name="awesomeListViewStyle" parent="@android:style/Widget.ListView"> <item name="android:fadingEdge">none</item> <item name="android:background">@color/orange</item> <item name="android:divider">#EEEEEE</item> </style> 

It does not affect. In Manifest Theme.MyTheme as the default theme. Please advice :)

+8
android coding-style android-widget android-styles
source share
1 answer

As mentioned in another answer , as Bhavin and Mark pointed out, in your style you should also add

 <item name="android:dividerHeight">1px</item> 
+1
source share

All Articles