Example usage for android.animation ValueAnimator end

List of usage examples for android.animation ValueAnimator end

Introduction

In this page you can find the example usage for android.animation ValueAnimator end.

Prototype

@Override
    public void end() 

Source Link

Usage

From source file:android.support.v17.leanback.app.PlaybackSupportFragment.java

/**
 * End first or second animator if they are still running.
 *///from w  w w.  ja  v a  2 s . co  m
static void endAll(ValueAnimator first, ValueAnimator second) {
    if (first.isStarted()) {
        first.end();
    } else if (second.isStarted()) {
        second.end();
    }
}

From source file:android.support.v17.leanback.app.PlaybackSupportFragment.java

/**
 * if first animator is still running, reverse it; otherwise start second animator.
 *///from w  w w .  j  av a2  s  .  c  o  m
static void reverseFirstOrStartSecond(ValueAnimator first, ValueAnimator second, boolean runAnimation) {
    if (first.isStarted()) {
        first.reverse();
        if (!runAnimation) {
            first.end();
        }
    } else {
        second.start();
        if (!runAnimation) {
            second.end();
        }
    }
}