通过子View获取当前Activity视图
2016-03-23 16:02
120 查看
public Bitmap captureScreen() {
((Activity)getContext()).getWindow().getDecorView().setDrawingCacheEnabled(true);
Bitmap bmp=((Activity)getContext()).getWindow().getDecorView().getDrawingCache();
return bmp;
}
((Activity)getContext()).getWindow().getDecorView().setDrawingCacheEnabled(true);
Bitmap bmp=((Activity)getContext()).getWindow().getDecorView().getDrawingCache();
return bmp;
}
相关文章推荐
- 深度解析Java8 – AbstractQueuedSynchronizer的实现分析(上)
- android颜色透明度
- NumberPicker的使用、关闭可编辑模式
- Linux学习--rsync同步备份实现
- 视频网址-北风网
- 拦截器 和 过滤器的区别
- linux源码安装--configure
- HZCommanFunc 使用一句话调用工具类,对文本,文件加密
- java的存储分配
- Qt构建OpenCV3.1CMake报错Failed to download opencv_ffmpeg.dll
- Unity着色器学习
- LeetCode 30 Substring with Concatenation of All Words(AC自动机+滑动窗口)
- BZOJ1002轮状病毒
- CHARINDEX 函数
- 203. Remove Linked List Elements
- cocoapods导入的第三方库出现大量错误时
- IOS绘图的基本步骤
- ios开发基础--滚动视图(UIScrollView)
- Matlab diff std setdiff exist
- 类与类之间的几种关系