Android examples for User Interface:View Bitmap
draw View Onto Bitmap
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.Canvas; import android.view.View; public class Main { public static Bitmap drawViewOntoBitmap(View view) { Bitmap image = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Config.RGB_565); Canvas canvas = new Canvas(image); view.draw(canvas);/* w w w.j a v a2s. co m*/ return image; } }