`

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;
    }

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics