在可见的xml,3边的android视图上创建边框?

我想为我的 Android按钮绘制一个可绘制,定义为drawable.我发现我可以使用一个矩形来设置所有的边框,但是当我想要三边时,我有点卡住了.我想要的例子有顶部或底部打开.

有没有人会告诉我怎么做?

尝试这样做,虽然我在其他一些帖子中看到了
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

<item>
<shape android:shape="rectangle" >
    <solid android:color="#FFFFFF" />
    <padding
        //android:bottom="10dp"  Remove this to avoid seeing the bottom border 
        android:left="10dp"
        android:right="10dp"
        //android:top="10dp"  Remove this to avoid seeing the top border
    />

    <corners android:radius="5dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle" >
    <padding
        android:bottom="5dp"
        android:left="5dp"
        android:right="5dp"
        android:top="5dp" />

    <solid android:color="#666666" />
</shape>
</item>
</layer-list>

https://stackoverflow.com/a/10133434/1244489

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念