I use the below code to generate the circular progress. But I don’t know how to change the pattern and color of it.
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:pivotX="10%" android:pivotY="10%" android:fromDegrees="0"
android:toDegrees="360">
<shape android:shape="ring" android:innerRadiusRatio="0"
android:thicknessRatio="6" android:useLevel="false">
<size android:width="10dip" android:height="10dip" />
<gradient android:type="linear" android:useLevel="false"
android:startColor="#000000"
android:endColor="#000000"
android:angle="0"
/>
</shape>
</rotate>
It generated the circular progress like below:

But I need to change the color and pattern like below:

I don’t want to implement the music icon. I just want the progress pattern and the color to look like the second image.
You need to use the AnimationDrawable class for your requirement,
create spin_animation.xml file in res/drawable/ folder:
Use following code to execute,