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>

      

+3
android android-layout xml progress-bar


source to share


No one has answered this question yet

Check out similar questions:

3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
960
How to rotate the screen of Android emulator?
620
How to define circle shape in rendered android xml file?
117
How to create a circular progress bar in Android that rotates on it?
3
Android - ProgressBar Circle with Rounded Nibs
3
progress
2
horizontal progress bar with lap indicator
2
Progressbar scroll does not rotate
2
How to decrease the speed of a custom ProgressBar
1
Change the new rotation speed of the Progressbar material



All Articles
Loading...
X
Show
Funny
Dev
Pics