ImageView Bitmap - Android User Interface

Android examples for User Interface:ImageView

Description

ImageView Bitmap

Demo Code


//package com.java2s;

import android.graphics.Bitmap;

import android.widget.ImageView;

public class Main {

    public static Bitmap imageView2Bitmap(ImageView view) {
        Bitmap bitmap = null;/*from   w w  w.  java 2s.c  o  m*/
        try {
            bitmap = Bitmap.createBitmap(view.getDrawingCache());
            view.setDrawingCacheEnabled(false);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bitmap;
    }
}

Related Tutorials