我有一個更大的視圖,裏面有一個textview和一個imageview。當我爲y軸設置較大的視圖時,imageview從0旋轉到180度(這正是我想要的),但textview在1度時消失,然後再次出現在180度處翻轉。我也注意到,如果我在20度停止視圖,文本完全不會出現,就好像android不能在除零和180之外的旋轉中顯示文本視圖。我相信我正確地遵循了這些示例。我確實看到了一些使用相機的例子,我應該在旋轉之前先拍攝較大視圖的圖片嗎?我最重要的問題是android動畫是否顯示除了0,180和-180以外的y的旋轉文本視圖? Y在屏幕的平面上。這裏是我的代碼:動畫不能用於與y方向旋轉的textview
FlashQView flashQView = flasQ.getView();
AnimatorSet animatorSet = (AnimatorSet)AnimatorInflater.loadAnimator(this, R.animator.exit);
animatorSet.setTarget(flashQView);
animatorSet.start();
這裏是我的exit.xml動畫文件:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:valueFrom="0"
android:valueTo="180"
android:propertyName="rotationY"
android:duration="2000" />
</set>
在此先感謝。