Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setRotationY() width API10 in Android

I am looking for a method / algorithm to do the equivalent of setRotationY() (which is available from the Android API 11), but with the API 10.

Thank you for your help.

Update, Answer:

Use the Android library http://nineoldandroids.com/ by @JakeWharton (thanks 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();
like image 536
Pauland Avatar asked Oct 27 '12 16:10

Pauland


1 Answers

I know we are not a LinkFactory but @JakeWharton spent time back porting the AnimationFramework from API11.

Checkout nineoldandroids.

Example:

ObjectAnimator.ofFloat(myView, "rotationX", 0, 90).setDuration(3000).start();
like image 100
Chris.Jenkins Avatar answered Sep 21 '22 13:09

Chris.Jenkins