1

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 part of the ListView because it moves up and down as I size the ListView. Has anyone ran into this before?

alt text

I couldn't get DDMS to take a screen capture for some reason so I took a picture of the screen with my G1, so please forgive the quality! As you can see the line is there at the top of the fade out in the list. alt text http://dl.dropbox.com/u/3618586/2010-05-07%2014.25.50.jpg

Community
  • 1
  • 1
CaseyB
  • 24,780
  • 14
  • 77
  • 112
  • Does it happen on a real device, or even emulator, or just in Eclipse? I imagine posting your layout would help too, if not. – Christopher Orr May 06 '10 at 21:27
  • It happens in both, I'm at home now, but I'll post a screen shot from the device and the layout tomorrow. – CaseyB May 07 '10 at 00:16

3 Answers3

2

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.

William Remacle
  • 1,480
  • 2
  • 16
  • 24
1

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

sashad
  • 11
  • 2
0

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"
Manfred Moser
  • 29,539
  • 13
  • 92
  • 123