Code example for LayoutAnimationController

0
  /** 
   * @return an animation controller 
   */ 
  public static LayoutAnimationController goDownAnimationController() {
    final float delay = 0.5f;
    return new LayoutAnimationController(goDownAnimation(), delay);
  } 
 
  private static Animation moveAnimation(final float fromX, final float toX, final float fromY, final float toY) {
    final long moveDuration = 200,
    alphaDuration = 100;
 
    final AnimationSet main = new AnimationSet(false);
 
    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(alphaDuration);
    main.addAnimation(animation);
 
    animation = new TranslateAnimation(
        Animation.RELATIVE_TO_SELF, fromX, Animation.RELATIVE_TO_SELF, toX,