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;//from   w  ww  . j a  v  a2  s .c  o  m
        view.setDrawingCacheEnabled(true);
        view.buildDrawingCache();
        bitmap = view.getDrawingCache();
        return bitmap;
    }
}

Related Tutorials