Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.graphics.drawable.BitmapDrawable;

import android.widget.ImageView;

public class Main {
    public static void stripImageView(ImageView view) {
        if (view.getDrawable() instanceof BitmapDrawable) {
            ((BitmapDrawable) view.getDrawable()).getBitmap().recycle();
        }
        view.getDrawable().setCallback(null);
        view.setImageDrawable(null);
        view.getResources().flushLayoutCache();
        view.destroyDrawingCache();
    }
}