扫码关注官方订阅号
android button border 效果如何设置.
闭关修行中......
drawable里做一个类似于这样的你看能不能行,background设为引用这个@drawable/xxx
drawable
background
@drawable/xxx
xml<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners -- 四个角的圆角半径,左边右边中间的区别就是在这里体现的 android:topLeftRadius="5dp" android:bottomLeftRadius="5dp" android:topRightRadius="0.1dp" android:bottomRightRadius="0.1dp" /> <stroke -- 指定边框,边框必须要的 android:width="0.5dp" android:color="#0000ff" /> <solid -- 填充颜色,选中和未选中的区别就在这里还有文字颜色 android:color="#0000ff" /> </shape>
xml
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners -- 四个角的圆角半径,左边右边中间的区别就是在这里体现的 android:topLeftRadius="5dp" android:bottomLeftRadius="5dp" android:topRightRadius="0.1dp" android:bottomRightRadius="0.1dp" /> <stroke -- 指定边框,边框必须要的 android:width="0.5dp" android:color="#0000ff" /> <solid -- 填充颜色,选中和未选中的区别就在这里还有文字颜色 android:color="#0000ff" /> </shape>
可以自定义圆角属性,也可以用元角背景图
.9.png
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
drawable
里做一个类似于这样的你看能不能行,background
设为引用这个@drawable/xxx
可以自定义圆角属性,也可以用元角背景图
.9.png