我认为你可以在两种不同的颜色和文本的线性布局中使用两个textview。然后你可以实现onClicklistener()
两个文本视图。你会达到你想要的,看起来和你所期望的一样。
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/settings"
android:layout_marginTop = "10dip"
android:padding="3dip"
android:text="@string/txt1"
android:textColor="#000000"
android:textSize="25sp"
android:textStyle="bold" />
<TextView
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/settings"
android:layout_marginTop = "10dip"
android:padding="3dip"
android:text="@string/txt2"
android:textColor="#1569C7"
android:textSize="25sp"
android:textStyle="bold" />
</LinearLayout>
希望它可以帮助
有没有简单的解决方案。如果您使用的是TextView而不是WebView,那么您需要先确定点击点的坐标(onClickListener在这里可能没有帮助 - 您需要使用Touch事件),并确定文本在文本视图。 – 2012-07-10 08:07:00