【发布时间】:2019-08-07 14:57:25
【问题描述】:
我想在 textview 中显示图像。我在 res/drawable/img.png 中有一张图片 这是我的代码:
String img="<img src='file:///res/drawable/img.png' />";
txt_html.append(Html.fromHtml(img));
但这行不通。
有什么想法吗?
【问题讨论】:
-
@Chris:谢谢你的链接,我会看的
-
@SystemParadox:您的链接无效:|我阅读了你们提供的所有主题,但解决问题太难了
-
@HanTran:如果您发现很难理解上面给出的两种解决方案,您可能想尝试使用 WebView 而不是 TextView。