Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.view.animation.Animation;

import android.view.animation.ScaleAnimation;

public class Main {

    public static ScaleAnimation getScaleAnimation(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));
        return mAnmation;
    }
}