private Bitmap screenShot() { View view = getWindow().getDecorView(); Display display = this.getWindowManager().getDefaultDisplay(); view.layout(0, 0, display.getWidth(), display.getHeight()); view.setDrawingCacheEnabled(true); Bitmap bmp = Bitmap.createBitmap(view.getDrawingCache()); return bmp; }
Android 截屏
最新推荐文章于 2021-05-31 15:58:03 发布