我正在用android xml动画挣扎。我想围绕其中心点逆时针旋转图像。Android动画在中心点周围旋转图像
这里是我的动画XML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true" >
<rotate
android:duration="1000"
android:repeatCount="infinite"
android:repeatMode="restart"
android:fromDegrees="360"
android:toDegrees="0"
android:pivotX="0.5"
android:pivotY="0.5"
android:interpolator="@android:anim/linear_interpolator"
/>
没有这个当前动画绕点x = 0的图像; y = 0。
你必须设置pivotX和pivotY到“50%” – Mahfa
Yuu是惊人的。我尝试了各种数字。我从来没有想过要尝试% – Zapnologica
欢迎您 – Mahfa