答案 0 :(得分:0)
使用其他选项设置edittext
参数。
此外,请勿使用<p>
进行设置。
只支持几个标记:
<a href="...">
<b>
<big>
<blockquote>
<br>
<cite>
<dfn>
<div align="...">
<em>
<font color="..." face="...">
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<i>
<img src="...">
<p>
<small>
<strike>
<strong>
<sub>
<sup>
<tt>
<u>
顺便说一下,你可以使用类似的东西:
EditText et = new EditText(this);
et.setText(Html.fromHtml("Simple Text <B>Formatted Text</B> Simple Text Again"));
但这很丑:)