How to slow down the rotation speed for the progress bar?
This question has been asked before, but it doesn't have good answers. I know how to speed it up by changing android: toDegrees "like in this link: http://codebin.co.uk/blog/custom-indeterminate-progressbar-on-android/
If android: toDegrees = "is set to 360, it completely rotates one revolution in 4 seconds. If android: toDegrees =" "is set to 720, it rotates perfectly one revolution in 2 seconds.
My problem is that I am setting android: toDegrees = "" to 180, trying to rotate one revolution for 8 seconds, it rotates half a revolution in 4 seconds, and then goes back to start.
As others have said, changing android: durtation does not affect circle progress progress. Hardcode xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape
android:shape="ring"
android:useLevel="false">
<solid android:color="#EF9A9A"/>
</shape>
</item>
<item android:id="@android:id/progress">
<rotate
android:duration="4000"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="180">
<shape
android:shape="ring"
android:useLevel="false">
<gradient android:color="@android:color/transparent"
android:angle="0"
android:startColor="#D50000"
android:type="sweep"
android:useLevel="false"/>
</shape>
</rotate>
</item>
</layer-list>
source to share
No one has answered this question yet
Check out similar questions: