Android 具有圆角的矩形,但在每侧定义了笔划
我将此用于我的listview背景:Android 具有圆角的矩形,但在每侧定义了笔划,android,android-layout,Android,Android Layout,我将此用于我的listview背景: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#C98E04"/> <stroke android:width="0.25dp" /&
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#C98E04"/>
<stroke android:width="0.25dp"
/>
<padding android:left="1dp"
android:top="1dp"
android:right="1dp"
android:bottom="1dp"
/>
<corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp"
android:topLeftRadius="7dp" android:topRightRadius="7dp"/>
</shape>
问题在于,在每个listview项之间,边框比框架厚。
如何定义更薄的上边框(笔划)?您可以将笔划大小最小化为0.1,并在listview中添加此项以最小化didvei间隙android:dividerHeight=“2dp”