我使用这个XML代码来旋转imageVeiw 180度:简单ImageView的旋转
<ImageView
android:id="@+id/keyP2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/btn4"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:rotation="180"
android:maxWidth="125dp"
android:scaleType="fitCenter"
android:src="@drawable/image0_key" />
也能正常工作的Android API版本11及以上,但android:rotation="180"
不支持低于API 11.我如何可以旋转imageView 180度低于11?
我使用此代码并将android:toDegrees =“360”更改为android:toDegrees =“180”。动画确实有效,但动画完成后,imageview会立即切换回原始位置。如何在动画播放后让imageview保持其位置? – Shane
好吧我解决了我的问题,在动画之后添加了这段代码:sampleFadeAnimation.setFillAfter(true);这将保持任何动画完成后的状态。谢谢您的帮助! – Shane
继续前进..感谢... – Srinivasan