Java Code Examples for android.view.View.postInvalidateDelayed()

The following are Jave code examples for showing how to use postInvalidateDelayed() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: GitHub   File: Utils.java   Source Code and License Vote up 5 votes
/**
 * Original method view.postInvalidateOnAnimation() only supportd in API >=
 * 16, This is a replica of the code from ViewCompat.
 *
 * @param view
 */
@SuppressLint("NewApi")
public static void postInvalidateOnAnimation(View view) {
    if (Build.VERSION.SDK_INT >= 16)
        view.postInvalidateOnAnimation();
    else
        view.postInvalidateDelayed(10);
}