主要代码以下:图片
public void shotScreen() {get
getWindow.getDecorView.setDrawingCacheEnabled(true);it
Bitmap bmp = getWindow.getDecorView.getDrawingCache();map
}co
注:上面代码屡次截屏的时候,获取的图片都是同样的,须要添加一下代码:void
getWindow.getDecorView.destroyDrawingCache();ab