// 截屏
public static Bitmap getScreenshotsForCurrentWindow(Activity activity) {
View cv = activity.getWindow().getDecorView();
Bitmap bmp = Bitmap.createBitmap(cv.getWidth(), cv.getHeight(),
Bitmap.Config.ARGB_4444);
cv.draw(new Canvas(bmp));
return bmp;
}