如何在位图或绘图中添加文本?
是否可以将动态文本添加到 android 中的可绘制或位图?我正在尝试做一些事情,比如动态获取一些文本并将该文本放入图像中。或者至少我想给用户一种错觉,即文本位于该图像内。
Is that possible to add a dynamic text to drawable or bitmap in android? im trying do something like get some text dynamically and put that text into an image. Or at least i want to give a illusion to the user that the text is inside that image.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道您已经找到了解决方案,但有些人可能对这种用文本设置 Imageview 的新方法感兴趣,
这是我的解决方案:-
-在您的位图图像上绘制文本位图,然后您可以设置位图到您的
Imageview
-谢谢!
I know you have found the solution but some people may be interested in this new way of setting Imageview with Text
Here is my Solution:-
-on your bitmap Image Draw Text On bitmap and then you can set Bitmap to your
Imageview
-THanks!
您是否考虑过使用相对布局简单地将
TextView
覆盖在ImageView
上?Have you considered simply overlaying a
TextView
over theImageView
using a relative layout?