带圆角的矩形,但每侧都定义了笔划

时间:2012-08-23 08:54:23

标签: android android-layout

我在我的列表视图背景中使用它:

<?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项之间,边框比框架更粗。 如何定义更高的上边框(笔划)?

1 个答案:

答案 0 :(得分:-1)

你可以将笔画的大小最小化到0.1,并在listview中添加这个以最小化dovei间隙android:dividerHeight =“2dp”