概述
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圆角设置所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复