0

How to set divider in ListView to partialy cover items above and below?

Hm, more info: I have drawable with transparent background and I want that drawable to be drawn on divider's upper and lower item.

"-1" for not showing that I've made research? I did, there is info about setting dividerHeight, but it won't set divider to cover items. Finally I've found this site: http://android.cyrilmottier.com/?p=454 where is written that divider is drawn just after listViews' background, so can't be "on" items.

So my question is: Is there any workaround?

Seraphis
  • 1,026
  • 2
  • 13
  • 30

1 Answers1

0

If I understand, maybe this will help you:

https://github.com/emilsjolander/StickyListHeaders

Chronos
  • 1,962
  • 17
  • 22
  • No, no. I wanted divider, that is between every items on ListView, to be drawn partialy covering items above and below. Hope it's clear now. – Seraphis Apr 25 '12 at 20:44
  • All right I understand now, you want to make this: android:divider="@drawable/some_drawable", but will not work for you. Instead you can try android:divider="@null" and add this drawable with transparent background on every list item, at bottom and top. Hope this helps. – Chronos Apr 25 '12 at 21:21
  • I tried that way and it's almost perfect.. Setting divider="@null" and/or dividerHeight="0px" and I still have black small line.. – Seraphis Apr 26 '12 at 18:25
  • I had 1px transparent space in drawable :-\ My mistake, your solution was great! thanks! :-) – Seraphis Apr 26 '12 at 21:44