Java tutorial
//package com.java2s; import android.view.animation.Animation; import android.view.animation.ScaleAnimation; public class Main { public static Animation getScaleAnimation(float fromX, float toX, float fromY, float toY, long duration) { Animation alpha = new ScaleAnimation(fromX, toX, fromY, toY, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); alpha.setDuration(duration); alpha.setFillAfter(true); return alpha; } }