Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;

import android.view.View;

import android.view.animation.Animation;

import android.view.animation.AnimationUtils;

public class Main {
    public static void animateView(Context context, View view, int resAnimId, long duration) {
        Animation a = AnimationUtils.loadAnimation(context, resAnimId);
        a.setDuration(duration);
        view.startAnimation(a);
    }
}