当前位置:网站首页>Use controls as brushes to get bitmap code records
Use controls as brushes to get bitmap code records
2022-08-01 05:07:00 【trace,】
int width = 1000;
int height = 1000;
TextView textView = new TextView(context);
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
Canvas canvas = new Canvas(bitmap);
textView.setText(“123”);
textView.setBackgroundColor(Color.YELLOW);
textView.setGravity(Gravity.CENTER);
textView.layout(0, 0, width, height);
textView.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
textView.draw(canvas);
边栏推荐
- 2022年超全的Android面经(附含面试题|进阶资料)
- USB3.0:VL817Q7-C0的LAYOUT指南(二)
- USB3.0:VL817Q7-C0的LAYOUT指南(三)
- Logitech Mouse Experience Record
- 25. 这三道常见的面试题,你有被问过吗?
- II. Binary tree to Offer 68 - recent common ancestor
- typescript28-枚举类型的值以及数据枚举
- 这里有110+公开的专业数据集
- 【云原生之kubernetes实战】kubernetes集群的检测工具——popeye
- pytroch、tensorflow对比学习—专栏介绍
猜你喜欢

Optional parameters typescript19 - object

7月编程排行榜来啦!这次有何新变化?

Visual Studio提供的 Command Prompt 到底有啥用

USB3.0:VL817Q7-C0的LAYOUT指南(二)

Excel record of integer programming optimization model to solve the problem

剑指 Offer 68 - I. 二叉搜索树的最近公共祖先

USB3.0:VL817Q7-C0的LAYOUT指南(三)

II. Binary tree to Offer 68 - recent common ancestor

Risk strategy important steps of tuning method

力扣(LeetCode)212. 单词搜索 II(2022.07.31)
随机推荐
Immutable
UE4 rays flashed from mouse position detection
可持久化线段树
Swastika line-by-line parsing and realization of the Transformer, and German translation practice (a)
LeetCode 387. 字符串中的第一个唯一字符
LeetCode 231. 2 的幂
MySQL-数据定义语言-DDLdatebase define language
Selenium:下拉框操作
MySQL-DML语言-数据库操作语言-insert-update-delete-truncate
UE4 模型OnClick事件不生效的两种原因
pytorch、tensorflow对比学习—功能组件(优化器、评估指标、Module管理)
TIM登陆时提示00001(TIM00001)
C# | 使用Json序列化对象时忽略只读的属性
Seleniu:元素常用操作
(2022 Niu Ke Duo School IV) N-Particle Arts (Thinking)
LeetCode 9. 回文数
Selenium:表单切换
请问shake数据库中想把源的db0的数据同步到目的db5,参数怎么设置呢?
ApiFile
typescript25 - type assertion