Android图片操作-截屏

// 截屏
    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;
    }

 

posted @ 2012-08-08 14:59  语带悠伤  阅读(176)  评论(0编辑  收藏  举报