animate View with Animation resource ID - Android User Interface

Android examples for User Interface:View Animation

Description

animate View with Animation resource ID

Demo Code


//package com.java2s;
import android.content.Context;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;

public class Main {
    public static Animation animateView(Context context,
            int animationResource) {
        Animation a = AnimationUtils.loadAnimation(context,
                animationResource);//www.j  a  va 2s .  c  om
        return a;
    }
}

Related Tutorials