-1

i can't understand, why divider don't comes after every item? It shows only after last item! I really don't know what to do.

I am parsing some information by using Jsoup.

What i have:

enter image description here

My Listview

   <ListView
    android:id="@+id/listView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentEnd="true"
    android:layout_alignParentTop="true"
    android:touchscreenBlocksFocus="true" />
One
  • 11
  • 3

2 Answers2

0

Try this code :

<ListView
    android:id="@+id/listView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentEnd="true"
    android:layout_alignParentTop="true"
    android:divider="#B9B9B9"
    android:touchscreenBlocksFocus="true" />
Karim
  • 322
  • 1
  • 10
0

If you are using ListView all you need to do is add android:divider tag, like this:

 <ListView 
     android:id="@+id/listView"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:layout_alignParentEnd="true"
     android:layout_alignParentTop="true"
     android:touchscreenBlocksFocus="true"
     android:divider="#FFCC00"
     android:dividerHeight="2dp"/>

Also Optionally you can set divider height with android:dividerHeight tag.

Jarik Eng
  • 310
  • 2
  • 10