Reputation: 6819
How do I hide the topmost divider of ListView
? I was able to hide the bottommost divider of the ListView
by using listView.setFooterDividersEnabled(false)
. However, using listView.setHeaderDividersEnabled(false)
won't hide the topmost divider. Please note that I did not add any view for my header and footer.
Below is a sample ListView I took from Samsung Galaxy S2: (I am referring to the divider on top of Wi-Fi sleep policy.)
Upvotes: 3
Views: 3992
Reputation: 6819
The topmost divider on the image above is not a header divider. It is the version of S2 for overscroll effect. So setting the header divider to false here won't work. Setting the divider height to 0 will hide it but at the expense of hiding all the other dividers. Unfortunately, setOverScrollMode
is only available from API 9 and up. So you have no control over the over scroll behavior on API 8 and below.
Upvotes: 1