Example usage for android.widget ViewFlipper setInAnimation

List of usage examples for android.widget ViewFlipper setInAnimation

Introduction

In this page you can find the example usage for android.widget ViewFlipper setInAnimation.

Prototype

public void setInAnimation(Context context, @AnimRes int resourceID) 

Source Link

Document

Specifies the animation used to animate a View that enters the screen.

Usage

From source file:Main.java

public static void FlipperShowIndex(Context context, ViewFlipper viewf, int index, int[] anmiArray) {
    if (viewf.getChildCount() != anmiArray.length / 2)
        return;/*w  w w .  jav  a 2  s . c o  m*/
    if (viewf.getDisplayedChild() != index) {
        viewf.setInAnimation(context, anmiArray[2 * index]);
        viewf.setOutAnimation(context, anmiArray[2 * index + 1]);
        viewf.setDisplayedChild(index);
    }

}