0
我想制作一个动画,将图像视图从屏幕的开始移动到最后,每次随机化x位置。我怎么能这样做?Android动画的图像视图移动和旋转
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator" >
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="359"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1000"
android:repeatCount="infinite"
/>
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toYDelta="100%"
android:repeatCount="infinite"
android:duration="3000"
></translate>
</set>
我不知道如何来随机X坐标,也是为什么即使我使用0%和100%,它并没有真正启动屏幕的开始和不结束结束。 感谢您提前提供任何帮助!