FlipAnimator animator = new FlipAnimator(imageViewOriginal, imageViewFlip,
imageViewFlip.getWidth() / 2, imageViewFlip.getHeight() / 2);
if (imageViewOriginal.getVisibility() == View.GONE) {
animator.reverse();
}
layout.startAnimation(animator);
There is a small check to tell the animator where to reverse the animation. This is not the perfect way, but you will get an idea. To initialize the animator, you will need to pass the original view and the flipped view and the x and y position of the axes about which it will be flipped.
The animator, internally uses a AccelerateDecelerateInterpolator.
“An interpolator where the rate of change starts and ends slowly but
accelerates through the middle.”
The main logic of the animation is written inside this method:
protected void applyTransformation(float interpolatedTime, Transformation t)
You can find the whole source code here.
References:
http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html
hi Kumar,
Can you tell me how to move from one page to other buy sliding the screen..I would be thankfull if u can help me with this..
If you want to do that kind of animation, try this.
Simple ViewPager for Android
Was great help !!! Thanks
Was great help . Thanks!!