rotate 90 degree Animation - Android Animation

Android examples for Animation:Rotate Animation

Description

rotate 90 degree Animation

Demo Code


//package com.java2s;

import android.view.animation.Animation;

import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;

public class Main {
    static public Animation rotate_90() {
        RotateAnimation rotate_90 = new RotateAnimation(180, 360,
                Animation.RELATIVE_TO_SELF, 0.5f,
                Animation.RELATIVE_TO_SELF, 0.5f);
        rotate_90.setDuration(500);/*  ww  w .  j a  va 2 s  .c  o  m*/
        rotate_90.setInterpolator(new LinearInterpolator());
        return rotate_90;

    }
}

Related Tutorials