0

i want to know if there is any way to display a drawable file in between the grid view rows ?(only rows) I want to get the layout in the following way

enter image description here

i used grid view to display books and i have divider in drawable folder and i need to show it in the that way

i searched a lot but every thing just says how to give color divider between rows but i need to display the divider from drawable

is there any way to do it?

Manohar
  • 22,116
  • 9
  • 108
  • 144
  • Possible duplicate of [android gridview row dividers / separators](http://stackoverflow.com/questions/12109126/android-gridview-row-dividers-separators) – R. Zagórski Nov 16 '16 at 10:13

1 Answers1

-1

You can define custom divider, check code snippet below:

 <GridView android:layout_width="wrap_content"
android:divider="@drawable/divider"
android:dividerHeight="3sp"
android:layout_height="wrap_content" />

where divider is your custom drawable image. You can also check this link for more clarification: custom divider

Community
  • 1
  • 1