Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.view.animation.Animation.AnimationListener;

import android.view.animation.RotateAnimation;

public class Main {

    public static RotateAnimation getRotateAnimation(float fromDegrees, float toDegrees, int pivotXType,
            float pivotXValue, int pivotYType, float pivotYValue, long durationMillis,
            AnimationListener animationListener) {
        RotateAnimation rotateAnimation = new RotateAnimation(fromDegrees, toDegrees, pivotXType, pivotXValue,
                pivotYType, pivotYValue);
        rotateAnimation.setDuration(durationMillis);
        if (animationListener != null) {
            rotateAnimation.setAnimationListener(animationListener);
        }
        return rotateAnimation;
    }
}