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.TranslateAnimation;

public class Main {

    public static TranslateAnimation getTranslateAnimationToSelf(float pivotFromX, float pivotToX, float pivotFromY,
            float pivotToY, int intDuration, boolean boolFillAfter) {
        TranslateAnimation mAnmation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, pivotFromX,
                Animation.RELATIVE_TO_SELF, pivotToX, Animation.RELATIVE_TO_SELF, pivotFromY,
                Animation.RELATIVE_TO_SELF, pivotToY);
        mAnmation.setDuration(intDuration);
        mAnmation.setFillAfter(boolFillAfter);
        // mAnmation.setRepeatMode(Animation.RESTART);
        // mAnmation.setRepeatCount(intRepeatCount);
        // mAnmation.setInterpolator(AnimationUtils.loadInterpolator(mContext,
        // com.webclient.R.anim.bounce_interpolator));
        return mAnmation;
    }
}