Code example for CycleInterpolator

0
 
            @Override 
            public void onClick(View v) {
                Animation anim = new TranslateAnimation(0, 10, 0, 0);
                anim.setDuration(1000);
                anim.setInterpolator(new CycleInterpolator(7));
                anim.setAnimationListener(new AnimationListener() {
 
                    @Override 
                    public void onAnimationStart(Animation animation) {
                        Log.i(TAG, "animation start.");
                    } 
 
                    @Override 
                    public void onAnimationEnd(Animation animation) {
                        Log.i(TAG, "animation end.");
                    } 
 
                    @Override 
                    public void onAnimationRepeat(Animation animation) {
                        Log.i(TAG, "animation repeat.");