I am creating a layout with a ListView
and at the very top of the list there is this weird black line that I can\'t seem to figure out how to get rid of! It\'s par
if you specify attribute dividerHeight in ListView
<ListView
android:dividerHeight="0.0px"
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
in layout xml it is not working for Android 2.2 for some reason Google groups say that it will be fixed in next cupcake
function ListView.setDividerHeight(0)
works fine
It is probably coming from the divider of ListView. Check out and play with setting
setDividerHeight(0)
as well as check header/footer dividers are off or use
setFooterDividersEnabled(false)
You can also set these in xml of course. e.g.
android:dividerHeight="0"
The problem is not the divider.
I was also looking for a solution to this and I found one :
You can do your own theme with this
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme" parent="android:Theme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
</resources>
And setting the theme to your manifest xml file and it works.
The windowContentOverlay to null fix the problem.