Android ListView divider strange problem
I have a ListView with a divider of 1pd thickness. But somehow every second divider in the ListView is thicker then the others ...as you can see on the picture
the code of the ListView is real simple :
<ListView
开发者_如何学运维 android:id="@+id/directoriesListView"
android:choiceMode="singleChoice"
android:clickable="true"
android:layout_weight="2.5"
android:cacheColorHint="@null"
android:footerDividersEnabled="false"
android:fadingEdge="none"
style="@style/ListView_NarrowItems"
/>
and the style :
<style
name="ListView_NarrowItems"
>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:background">#000000</item>
<item name="android:divider">#FFFFFF</item>
<item name="android:dividerHeight">1px</item>
</style>
any idea what is wrong ?
Android is scaling your activity. Add the appropriate <supports-screens>
element to your manifest, set to indicate what screen sizes you are handling, and this effect should disappear.
According to this blog post it's due to your application running in compatibility mode and the solution is to put minSdk and targetSdk in your application manifest like this:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8"/>
精彩评论