Example usage for android.view View postInvalidateOnAnimation

List of usage examples for android.view View postInvalidateOnAnimation

Introduction

In this page you can find the example usage for android.view View postInvalidateOnAnimation.

Prototype

public void postInvalidateOnAnimation() 

Source Link

Document

Cause an invalidate to happen on the next animation time step, typically the next display frame.

This method can be invoked from outside of the UI thread only when this View is attached to a window.

Usage

From source file:Main.java

/**
 * Original method view.postInvalidateOnAnimation() only supportd in API >=
 * 16, This is a replica of the code from ViewCompat.
 *
 * @param view/*from   w  w w  . j a  v  a2  s . co  m*/
 */
@SuppressLint("NewApi")
public static void postInvalidateOnAnimation(View view) {
    if (Build.VERSION.SDK_INT >= 16)
        view.postInvalidateOnAnimation();
    else
        view.postInvalidateDelayed(10);
}

From source file:Main.java

public static void postInvalidateOnAnimation(View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        view.postInvalidateOnAnimation();
    } else {/*ww w. j a va2 s .  co  m*/
        view.invalidate();
    }
}

From source file:Main.java

/**
 * @see android.view.View#postInvalidateOnAnimation()
 *//*from   www  . j a  v a  2  s  .c o  m*/
public static void postInvalidateOnAnimation(View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        view.postInvalidateOnAnimation();
    } else {
        view.postInvalidate();
    }
}

From source file:Main.java

public static void seekAnim(View view, AnimatorSet animatorset, long l1) {
    seekAnim(animatorset, l1);/*w  w  w.ja  v a 2  s.c  o m*/
    view.postInvalidateOnAnimation();
}