AndroidStudio: How to set the distance between the items of the listview

1 Overview

When using ListView, sometimes you will find that the spacing between each item of the listview is sometimes relatively large, sometimes relatively small, you can add the following code:

//Used to control the spacing between items
android:dividerHeight="10dp"

android:divider="@null"
android:fadingEdge="none"
android:headerDividersEnabled="false"
android:footerDividersEnabled="false"
android:dividerHeight="10dp"

Guess you like

Origin blog.csdn.net/qq_42362997/article/details/105448589