Code example for AccelerateInterpolator

0
                                  getHeight());
      anim.setAnimationListener(collapseListener);
    } 
     
    anim.setDuration(speed);
    anim.setInterpolator(new AccelerateInterpolator(1.0f));
    startAnimation(anim);
  } 
   
  Animation.AnimationListener collapseListener=new Animation.AnimationListener() {
    public void onAnimationEnd(Animation animation) { 
      setVisibility(View.GONE); 
    } 
     
    public void onAnimationRepeat(Animation animation) { 
      // not needed 
    } 
     
    public void onAnimationStart(Animation animation) { 
      // not needed 
    }