0

I'm still fairly new to android, but I was hoping to figure some stuff out about animations.

I was trying to build a view flip animation, but it became one of the sketchiest things I've seen right off the bat. I tried this:

Animation in XML:

<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:valueTo="360"
    android:propertyName="rotationY" >
</objectAnimator>

Animation application in Java:

ObjectAnimator animation = (ObjectAnimator)AnimatorInflater.loadAnimator(contextReference, R.animator.card_left_flip);
animation.setTarget(passView);
animation.setDuration(2000);
animation.start();

This produced a very terrible animation that would crop my views, rather than add perspective.

Is there a good way to perform 3D animations in android, preferably with matrices, without having to use OpenGL?

4

1 回答 1

1

从 Api 演示中看看这个: Rotate3dAnimation

我使用它的方式是动画 180 度,在 ImageView 中交换图像,然后旋转回来。它工作得很好。

于 2013-02-07T21:32:36.927 回答