Skip to content Skip to sidebar Skip to footer

Transform And Scale Animation On A View

I have a linear layout with three images in it. On the click of any ImageView I want to animate the whole linear layout. The animation consists of two animations - scale and transf

Solution 1:

I used nineoldandroids library to achieve this animation. I used two animation: translation and scaling.

Translation:

ObjectAnimator.ofFloat(frameCategoryScroll, "translationY", 0, -yValue).setDuration(600).start();

yValue is the the value in y axis upto which I want to translate.

Scaling:

ObjectAnimator.ofFloat(frameCategoryScroll, "scaleX", 1.0f, 0.6f).setDuration(600).start();
ObjectAnimator.ofFloat(frameCategoryScroll, "scaleY", 1.0f, 0.6f).setDuration(600).start();

Post a Comment for "Transform And Scale Animation On A View"