XML布局View转换成Bitmap
来源:互联网 发布:餐饮宣传单设计软件 编辑:程序博客网 时间:2024/06/05 21:55
view通过LayoutInflater获得XML布局
View view = getLayoutInflater().inflate(R.layout.layout_your, null);
view转换为Bitmap
public Bitmap convertViewToBitmap(View view){ view.measure(View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED),View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED)); view.layout(0,0,view.getMeasuredWidth(),view.getMeasuredHeight()); view.buildDrawingCache(); Bitmap bitmap = view.getDrawingCache(); return bitmap; }
阅读全文
0 0
- XML布局View转换成Bitmap
- 将xml布局转换成view对象
- View转换成Bitmap
- 将View 转换成 Bitmap
- 将View转换成Bitmap
- 将View转换成Bitmap
- 将xml布局转换成View的几种方式
- 将xml布局转换成View的几种方式
- Android 将布局文件转成图片(将View 转换成BitMap)
- Android 将布局文件转成图片(将View 转换成BitMap)
- 如何把View转换成Bitmap
- android view转换成bitmap截图
- 把 view 转换成bitmap对象
- android--如何将View转换成Bitmap
- Android 将View转换成BitMap
- Android把View转换成Bitmap
- 如何将view转换成bitmap
- View转换Bitmap
- string.reserve 与 string.resize的区别
- Round 6 F
- mysql时间格式化,按时间段查询的MySQL语句
- Android程序签名详解、打包,分别使用keytool工具和Android Studio生成数字证书
- 广度优先搜索与深度优先搜索的 java 实现
- XML布局View转换成Bitmap
- ProgrammingMethodology
- 学习SVM(五)理解线性SVM的松弛因子
- 数据库隔离级别
- 有关于simulink无法打开slx:错误使用open(line 162) no such file or directory
- 水平居中
- 蘑菇街2016招聘笔试(最大间隔)
- GET和POST区别
- 前端表单验证常用的15个JS正则表达式