Android开发之shape定义进度条样式

1.xml代码如下

<rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromDegrees="0"
    android:pivotX="50%"
    android:pivotY="50%"
    android:toDegrees="360">
    <shape
        android:innerRadiusRatio="3"
        android:shape="ring"
        android:thicknessRatio="8"
        android:useLevel="false">
        <gradient
            android:centerColor="#ff0000"
            android:endColor="#111111"
            android:startColor="#B23AEE"
            android:type="sweep"
            android:useLevel="false" />
    </shape>
</rotate>

2.看下效果图:


猜你喜欢

转载自blog.csdn.net/xiayiye5/article/details/80916435
今日推荐