TextView t3 = (TextView) findViewById(R.id.text3); t3.setText(Html.fromHtml( "<b>text3:</b> Text with a " + "<a href="http://www.google.com">link</a> " +"created in the Java source code using HTML."));
二、TextView显示html文件中的图片 我们知道要让TextView解析和显示Html代码。可以使用 [plain] 复制代码 代码如下: Spanned text = Html.fromHtml(source); tv.setText(text);