Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default divider color for all ListViews

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

Please note at some places I am using 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>

This has no effect. In the Manifest Theme.MyTheme as my default theme. Please advice :)

like image 200
Siddharth Menon Avatar asked Apr 05 '12 12:04

Siddharth Menon


1 Answers

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

<item name="android:dividerHeight">1px</item>
like image 102
Maco03 Avatar answered Oct 24 '22 18:10

Maco03