Example usage for android.view View postInvalidateDelayed

List of usage examples for android.view View postInvalidateDelayed

Introduction

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

Prototype

public void postInvalidateDelayed(long delayMilliseconds) 

Source Link

Document

Cause an invalidate to happen on a subsequent cycle through the event loop.

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/*www .  ja  va2 s  . c o  m*/
 */
@SuppressLint("NewApi")
public static void postInvalidateOnAnimation(View view) {
    if (Build.VERSION.SDK_INT >= 16)
        view.postInvalidateOnAnimation();
    else
        view.postInvalidateDelayed(10);
}