Android中的setRotationY()width API10

Pau*_*and 6 animation android rotation

我正在寻找一种方法/算法来做相当于setRotationY()(可以从Android API 11获得),但是使用API​​ 10.

谢谢您的帮助.

更新,答案:

使用@JakeWharton 的Android库http://nineoldandroids.com/(感谢Chris.Jenkins)

if (android.os.Build.VERSION.SDK_INT > 10)
    this.mBehindView.setRotationY(180);
else
    ObjectAnimator.ofFloat(this.mBehindView, "rotationY", 0, 180).setDuration(0).start();
Run Code Online (Sandbox Code Playgroud)

Chr*_*ins 5

我知道我们不是LinkFactory,但@JakeWharton花了很多时间从API11移植AnimationFramework.

Checkout nineoldandroids.

例:

ObjectAnimator.ofFloat(myView, "rotationX", 0, 90).setDuration(3000).start();
Run Code Online (Sandbox Code Playgroud)