我是靠谱客的博主 干净世界,这篇文章主要介绍Android之Button圆角设置,现在分享给大家,希望可以做个参考。

res下drawable内创建shape.xml

复制代码
1
2
3
4
5
6
7
8
<?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圆角设置内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(58)

评论列表共有 0 条评论

立即
投稿
返回
顶部