How to increase the rotation speed in android?

后端 未结 6 2049
终归单人心
终归单人心 2020-12-24 10:59

I have an image drawable. i rotating the image like a progress bar.



        
6条回答
  •  旧巷少年郎
    2020-12-24 11:55

    According to this link:

    The rotation speed of the indeterminate progress bar is fixed at one revolution every 4 seconds, changing the duration attribute in the drawable XML has no effect. If you prefer to speed it up, you can change the toDegrees attribute to multiples of 360:

    • 720 makes one turn in 2 seconds
    • 1080 makes one turn in 1.33 seconds
    • 1440 makes one turn in 1 second

    In addition, you can just use indeterminateDuration for the ProgressBar.

提交回复
热议问题