- 博客(1)
- 资源 (2)
- 收藏
- 关注
转载 截图功能
在github上看到一个可以实现截图功能的demo,,, 使用方法:public void getScreen() { String filename = getApplication().getFilesDir().toString() + "test.png"; ScreentShotUtil.getInstance().takeScreenshot(getApplicationContex...
2017-11-02 10:21:05 257
Android截图
在github上看到一个可以实现截图功能的demo,,,(资源分不知道为什么不能设成0,所以就选择了最小的2)
使用方法:public void getScreen() {
String filename = getApplication().getFilesDir().toString() + "test.png";
ScreentShotUtil.getInstance().takeScreenshot(getApplicationContext(),
filename);
}
把ScreentShotUtil.class和ShellUtils.class复制到src/包名下即可;
需要在哪里实现截图就在哪里调用getScreen()。
2017-11-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人