设置xml中控件的圆润边框效果

 1 <?xml version="1.0" encoding="utf-8"?>
 2 
 3 <shape xmlns:android="http://schemas.android.com/apk/res/android">
 4 
 5 <!-- 背景填充颜色值 -->
 6 
 7 
 8 <solid android:color="#FFA500"/>
 9 
10 <!-- radius值越大,越趋于圆形 -->
11 
12 
13 <corners android:radius="100dip"/>
14 
15 <!-- 圆角图像内部填充四周的大小 ,将会以此挤压内部布置的view -->
16 
17 
18 <padding android:top="13dip" android:right="13dip" android:left="13dip" android:bottom="13dip"/>
19 
20 </shape>


效果图片:

原文地址:https://www.cnblogs.com/labixiaoxin/p/4950592.html