我想为我的
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>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。