方法一:
Picture snapShot = view.capturePicture();
if (snapShot.getWidth() > 0 && snapShot.getHeight() > 0) {
Bitmap b = Bitmap.createBitmap(snapShot.getWidth(),
snapShot.getHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
snapShot.draw(c);
Bitmap newBitmap = zoomBitmap(b, 250, 250);
historyModel.setSnapshot(newBitmap);
方法二(经过测试,平板竖屏是经常截图失败, 原因是root.getDrawingCache()尺寸超过限制):
View root = activity.getWindow().getDecorView();
private Bitmap catc