Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Canvas; import android.view.View; public class Main { public static Bitmap captureView(View view, int j, int k) { Bitmap bitmap = Bitmap.createBitmap(j, k, android.graphics.Bitmap.Config.ARGB_8888); view.draw(new Canvas(bitmap)); return bitmap; } }