Example usage for android.view View invalidate

List of usage examples for android.view View invalidate

Introduction

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

Prototype

@UnsupportedAppUsage
public void invalidate(boolean invalidateCache) 

Source Link

Document

This is where the invalidate() work actually happens.

Usage

From source file:com.facebook.litho.ComponentHostUtils.java

/**
 * Mounts a drawable into a view./*from  www.j  av a  2  s. c o m*/
 * @param view view into which the drawable should be mounted
 * @param drawable drawable to be mounted
 * @param bounds bounds of the drawable being mounted
 * @param flags flags that determine whether the drawable obtains state from the view
 * @param nodeInfo nodeInfo associated to the drawable node
 */
static void mountDrawable(View view, Drawable drawable, Rect bounds, int flags, NodeInfo nodeInfo) {
    drawable.setVisible(view.getVisibility() == View.VISIBLE, false);
    drawable.setCallback(view);
    maybeSetDrawableState(view, drawable, flags, nodeInfo);
    view.invalidate(bounds);
}