Example usage for android.animation LayoutTransition setDuration

List of usage examples for android.animation LayoutTransition setDuration

Introduction

In this page you can find the example usage for android.animation LayoutTransition setDuration.

Prototype

public void setDuration(int transitionType, long duration) 

Source Link

Document

Sets the duration on one of the animation objects used by this transition.

Usage

From source file:com.ywesee.amiko.MainActivity.java

@TargetApi(16)
void setLayoutTransition() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        LayoutTransition lt = new LayoutTransition();
        lt.enableTransitionType(LayoutTransition.CHANGING);
        lt.setDuration(LayoutTransition.APPEARING, 100 /*500*/);
        lt.setDuration(LayoutTransition.DISAPPEARING, 100);
        mViewHolder.setLayoutTransition(lt);
    }//from w w w.ja  va2 s  . c  o m
}