Java tutorial
//package com.java2s; import android.view.View; import android.view.animation.Animation; import android.view.animation.ScaleAnimation; public class Main { public static void setScaleAnimation(View view, float ScaleFromX, float ScaleToX, float ScaleFromY, float ScaleToY, float pivotX, float pivotY, int intDuration, int intRepeatCount, boolean boolFillAfter) { ScaleAnimation mAnmation = new ScaleAnimation(ScaleFromX, ScaleToX, ScaleFromY, ScaleToY, Animation.RELATIVE_TO_SELF, pivotX, Animation.RELATIVE_TO_SELF, pivotY); mAnmation.setDuration(intDuration); mAnmation.setFillAfter(boolFillAfter); if (intRepeatCount != 1) { mAnmation.setRepeatMode(Animation.RESTART); mAnmation.setRepeatCount(intRepeatCount); } // translateAnimation.setInterpolator(AnimationUtils.loadInterpolator(mContext, // com.webclient.R.anim.bounce_interpolator)); view.startAnimation(mAnmation); } }