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.

Milos Cuculovic
  • 19,631
  • 51
  • 159
  • 265
  • 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
  • It works, greqt. Thank you very much Sam. Can you please answer the question so I can accept. – Milos Cuculovic 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
  • 86,580
  • 20
  • 181
  • 179