Android 如何在文本视图中更改单个单词的文本大小和颜色

Android 如何在文本视图中更改单个单词的文本大小和颜色,android,textview,Android,Textview,我正在设计一个应用程序,我可以改变大小和颜色的单个字。我附上了如下图片。这是我的xml代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/listview_with_ad" android:layout_width="fill_parent" android:la

我正在设计一个应用程序,我可以改变大小和颜色的单个字。我附上了如下图片。这是我的xml代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/listview_with_ad"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#00FFFF"
android:textSize="24"
android:text="Download these two Application and get the Environmental Lighting feature for FREE" />

</RelativeLayout>

在这里,我想显示“自由”字与大文本大小和不同的颜色。有什么建议吗


您可以尝试
SpannableString
,它是一个功能强大的工具,您可以使用它在
TextView
中设置多种样式。看

使用html和css设置文本,以便在xml文件而不是代码中进行更改