效果图
资源文件
res/drawable/bg_ring.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadius="45dp"
android:shape="ring"
android:thickness="0.5dp"
android:useLevel="false">
<stroke
android:width="0.5dp"
android:color="#58C9E7" />
</shape>
android:innerRadius
是圆环半径
android:shape="ring"
指定形状为圆环
android:thickness="0.5dp"
环的宽度
android:useLevel="false"
设置为false才生效