Wednesday, October 29, 2014

Android makeIn/fadeIn and makeOut/fadeOut Animation

If you want to make swipe in/out animation, Android by default provides a utility class called AnimationUtils. The class AnimationUtils Defines common utilities for working with animations.

1. Swipe out/ Fade out Effect.
The AnimationUtils class have static method called makeOutAnimation , used to exhibit swipe out/fade out animations.

Animation anim = AnimationUtils.makeOutAnimation(context, fromLeft);

It creates an animation for objects becoming visible. Uses a slide and fade effect.


2. Swipe In/ Fade In Effect.
The AnimationUtils class have static method called makeInAnimation , used to exhibit swipe out/fade out animations.

Animation anim = AnimationUtils.makeInAnimation(context, fromLeft);

It creates an animation for objects becoming invisible. Uses a slide and fade effect.

Advertisement