Example usage for android.view ViewGroup destroyDrawingCache

List of usage examples for android.view ViewGroup destroyDrawingCache

Introduction

In this page you can find the example usage for android.view ViewGroup destroyDrawingCache.

Prototype

@Deprecated
public void destroyDrawingCache() 

Source Link

Document

Frees the resources used by the drawing cache.

Usage

From source file:org.odk.collect.android.widgets.QuestionWidget.java

private void recycleDrawablesRecursive(ViewGroup viewGroup, List<ImageView> images) {

    int childCount = viewGroup.getChildCount();
    for (int index = 0; index < childCount; index++) {
        View child = viewGroup.getChildAt(index);
        if (child instanceof ImageView) {
            images.add((ImageView) child);
        } else if (child instanceof ViewGroup) {
            recycleDrawablesRecursive((ViewGroup) child, images);
        }//from  w w  w  .  j a v  a2  s.co  m
    }
    viewGroup.destroyDrawingCache();
}