问题
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 :)
回答1:
As mentioned in another answer as Bhavin and Mark pointed out, in your style you should also add
<item name="android:dividerHeight">1px</item>
来源:https://stackoverflow.com/questions/10028246/how-to-change-the-default-divider-color-for-all-listviews