Java tutorial
//package com.java2s; import android.app.Activity; import android.graphics.Bitmap; public class Main { public static Bitmap capture(Activity act) { act.getWindow().getDecorView().setDrawingCacheEnabled(true); Bitmap bmp = act.getWindow().getDecorView().getDrawingCache(); return bmp; } }