Here you can find the source of shotScreen(View cv)
public static Bitmap shotScreen(View cv)
//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 shotScreen(View cv) { try {// www.j a v a 2 s.c o m cv.setDrawingCacheEnabled(true); Bitmap bmp = Bitmap.createBitmap(cv.getWidth(), cv.getHeight(), Config.ARGB_8888); Canvas canvas = new Canvas(bmp); cv.draw(canvas); cv.setDrawingCacheEnabled(false); return bmp; } catch (Exception e) { return null; } } }