0

我使用 shape drawable 来绘制背景,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient android:startColor="#888888"
        android:endColor="#888888"
        android:angle="270"/>
    <corners android:topLeftRadius="4dip"
        android:topRightRadius="4dip"/>
    <stroke
        android:width="2dip"
        android:color="#666666"
        android:dashWidth="10dip"
        android:dashGap="0dip" />
</shape> 

我想设置没有中风的底边。
我该如何修改它?

4

1 回答 1

1

尝试这个

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item>
        <shape>
            <padding
                android:bottom="3dip"
                android:left="3dip"
                android:right="3dip"
                android:top="3dip" />
            <corners
                android:topLeftRadius="6dip"
                android:topRightRadius="6dip" />

            <solid android:color="#666666" />
        </shape>
    </item>
    <item>
        <shape android:shape="rectangle" >
            <gradient
                android:angle="270"
                android:endColor="#888888"
                android:startColor="#888888" />
        </shape>
    </item>

于 2013-09-04T09:49:36.533 回答