start Animation - Android android.view.animation

Android examples for android.view.animation:Animation

Description

start Animation

Demo Code

import android.graphics.drawable.AnimationDrawable;
import android.view.View;

public class Main {

  public static void startAnimation(int resId, View view) {
    view.setBackgroundResource(resId);/*  w  w w .j  a  va  2 s.c om*/
    ((AnimationDrawable) view.getBackground()).start();
  }

}

Related Tutorials