0

I have a listview with custom adapter and some elements inside. Then I added a header to this listView. The elements in the listView are separated by line and I would like to separate also with a line the header from the first element of the list.

Is that possible? If so, how can I do it.

Thank you very much.

Miloš
  • 17,005
  • 46
  • 137
  • 240
  • 1
    Simply add one of these answers to the bottom of your header's layout: [Android Drawing Separator/Divider Line in Layout?](http://stackoverflow.com/q/5049852/1267661) – Sam Sep 11 '12 at 22:41
  • Thank you Sam, I will try it. – Miloš Sep 11 '12 at 22:48
  • It works, greqt. Thank you very much Sam. Can you please answer the question so I can accept. – Miloš Sep 11 '12 at 23:16

1 Answers1

2

Brought up from comments:
Simply add one of these answers to the bottom of your header's layout: Android Drawing Separator/Divider Line in Layout?


I would lean towards the third answer with:

    style="?android:attr/listSeparatorTextViewStyle"

if you want to mimic the dividers that already exist.

Glad I could help!

Community
  • 1
  • 1
Sam
  • 84,460
  • 18
  • 172
  • 171