Question

I use shape drawable to draw a background as below:

<?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> 

I want to set the bottom edge without stroke.
How can I modify it?

Was it helpful?

Solution

Try this

<?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>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top