Code example for ScaleAnimation

Methods: setAnimationListener, setDuration, setFillAfter

0
    } 
 
    // 3b 
    public void scaleIn() { 
      Log.i("animation", "scaling in ...");
      ScaleAnimation animation = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f);
      animation.setFillAfter(true);
      animation.setDuration(5000);
      animation.setAnimationListener(new ScaleInEndListener());
      animView.startAnimation(animation); 
    } 
 
    private class ScaleInEndListener implements AnimationListener {
        public void onAnimationEnd(Animation animation) {
          rotate(); 
        } 
        public void onAnimationRepeat(Animation animation) { }
        public void onAnimationStart(Animation animation) { }
    } 
}