3
是否可以更改Android中字符串中某些字符的颜色?例如,将单词android中的字母d和r的颜色更改为绿色。Android字符串颜色
<TextView
android:id="@+id/word"
android:gravity="center_vertical"
android:typeface="monospace"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textSize="30pt"/>
我只是使用XML TextView,例如我在主要问题中插入的那个。我使用word.setText(“Android”)在主代码中显示文本,但我需要将某些字符更改为不同的颜色。 – zataar 2012-02-26 06:21:06