【发布时间】:2017-02-23 13:54:54
【问题描述】:
这里是代码, 我希望显示图像。我也尝试了 Size。
TextView textViewHtml = (TextView) findViewById(R.id.text_html_program);
Spanned spanned = Html.fromHtml( "<b>text_html_program: Constructed from HTML programmatically.</b>"
+ " Text with a <a href=\"http://www.google.com\">link</a> "
+"<b><img src=\"http://innovativeprofessionaloffices.com/wp-content/uploads/2014/07/seo-for-small-business.jpg\" alt=\"testing\"></b>"
+ "created in the Java source code using HTML.");
textViewHtml.setText(spanned);
textViewHtml.setMovementMethod(LinkMovementMethod.getInstance());
【问题讨论】:
-
@Ragini 谢谢很多帮助,但我猜 TextView 刷新不起作用。只给我看了一次。
标签: android html image textview