Android 控件界面转成Bitmap
16lz
2021-01-23
方法一:
customView.setDrawingCacheEnabled(true);Bitmap bitmap = Bitmap.createBitmap(customView.getDrawingCache());
方法二:
Bitmap bitmap = Bitmap.createBitmap(customView.getWidth(), customView.getHeight(), Bitmap.Config.ARGB_8888);Canvas canvas = new Canvas(bitmap);customView.draw(canvas);
更多相关文章
- 关于android Http访问,上传,用了三个方法
- Android的Bitmap类中常用方法
- Android 上进行签名的方法
- Android jar包Proguard混淆方法
- Android中SQLite增删改查的方法(Android开发视频讲座)
- Android Post方法请求URL 迭代器
- Android DEX方法超过64K和gradle编译OOM解决方案
- Android下按扭的使用方法
- API 23及之后版本关于用android studio 中LocationManager的方法