3

Is it possible to make a space between horizontal Listview items?
I try this for listview.
android:divider="#ffff00" android:dividerHeight="10dp"

It's working fine in listview. but I want add divider between horizontal Listview items. How to rectify this Problem?. Share Your Idea?

Renjith
  • 5,783
  • 9
  • 31
  • 42
user2342047
  • 29
  • 1
  • 3

3 Answers3

0

Set border around your list items in xml file or add custom view as below:

<View 
    android:layout_height="match_parent"
    android:width="1dp"
    android:background="#ffff00"
/>
Mihir Shah
  • 1,799
  • 3
  • 29
  • 49
0

what do you mean by horizontal list view in Android?

If it is customised list then add a view betwwen two items and set the backgroundcolor for the view.

0

With all respect to @Mihir Shah, updating his answer to match your requirement.

Set border around your list items in xml file or add custom view as below:

<View 
    android:layout_height="match_parent"
    android:width="1dp"
    android:background="@android:color/transparent"
/>

This will provide space you require.

CRUSADER
  • 5,486
  • 3
  • 28
  • 64