答案 0 :(得分:0)
尝试这种方式
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="180"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="180">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-100dp"
android:right="-100dp"
android:top="-80dp">
<shape android:shape="oval">
<size android:height="20dp" />
<gradient
android:angle="0"
android:centerColor="@color/colorAccent"
android:endColor="@color/colorPrimary"
android:startColor="@color/colorPrimary"
android:type="linear" />
</shape>
</item>
<item>
<shape android:shape="rectangle" />
</item>
</layer-list>
</rotate>
输出