Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.view.View;
import android.view.animation.RotateAnimation;

public class Main {
    public static void rotateAnimation(View view, float fromDegree, float toDegree) {
        final RotateAnimation rotateAnim = new RotateAnimation(fromDegree, toDegree,
                RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f);

        rotateAnim.setDuration(200);
        rotateAnim.setFillAfter(true);
        view.startAnimation(rotateAnim);
    }
}