Pra*_*een 40 animation android rotation
我有一个可绘制的图像.我像进度条一样旋转图像.
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"
android:toDegrees="360" android:drawable="@drawable/spinner_white_48" />
Run Code Online (Sandbox Code Playgroud)
我想提高转速?为此,我必须使用什么属性?
Dus*_*inB 124
使用不确定的ProgressBar动画设置持续时间和/或重复计数并没有帮助我.我不得不增加toDegrees以使其产生额外的循环:
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_indeterminate_progress"
android:duration="1"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="1080" /> <!--1080 is 3 loops instead of 1 in same amt of time-->
Run Code Online (Sandbox Code Playgroud)
小智 10
将代码添加到progress.xml
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="0"
android:toDegrees="1080" /> <!--1080 is 3 loops instead of 1 in same amt of time-->
Run Code Online (Sandbox Code Playgroud)
设置希望动画运行的持续时间和repeatCount。