res下drawable内创建shape.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
>
<solid android:color="@color/colortransparent"/> 按钮的背景颜色此时为透明
<stroke android:width="3dp"
android:color="@color/colorPrimary"/> 按钮边框的宽度和颜色
<corners android:radius="5dp"/> 圆角的弧度
</shape>
使用的话在xml里直接设置成Button的背景就行了
效果图
最后
以上就是干净世界最近收集整理的关于Android之Button圆角设置的全部内容,更多相关Android之Button圆角设置内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复