前言
使用Shape 的oval 属性画圆环图形在api15及api16 上会变成黑圆形
如下图所示
xml 如下
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size android:width="235dp"
android:height="235dp" />
<stroke android:width="1dp"
android:color="@color/tr_white1" />
</shape>
解决办法
经过研究 发现 需要填充背景色为透明即可
<solid android:color="#00ffffff" />
如下图
xml 如下
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size android:width="235dp"
android:height="235dp" />
<stroke android:width="1dp"
android:color="@color/tr_white1" />
<solid android:color="#00ffffff" />
</shape>