[英]How to get a screenshot via display android in android
I need to get a screenshot of when the application is minimized我需要获取应用程序最小化时间的屏幕截图
This code a grab screenshot from rootView
of application activity:这段代码是来自应用活动的
rootView
的抓取屏幕截图:
View v1 = getWindow().getDecorView().getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap original = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false);
How to get a screenshot from the display, and not from the activity view?如何从显示器而不是从活动视图中获取屏幕截图?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.