get View Image - Android User Interface

Android examples for User Interface:ImageView

Description

get View Image

Demo Code


//package com.java2s;
import android.graphics.Bitmap;

import android.view.View;

public class Main {

    public static Bitmap getViewImg(View view) {
        Bitmap bitmap = null;//  w  w  w .  ja  v a 2s.  c o  m
        view.setDrawingCacheEnabled(true);
        view.buildDrawingCache();
        bitmap = view.getDrawingCache();
        return bitmap;
    }
}

Related Tutorials