【发布时间】:2020-09-13 15:49:35
【问题描述】:
以下是我必须在文本视图中设置的文本。我想在点击超链接时打开 webview。其余文本不应是可点击的。
String value = "Check on this link: <a href="http://www.google.com">Go to Google</a>";
binding.text.setText(value);
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:autoLink="web"
android:textColorLink="@color/g_turquoise_blue" />
提前致谢。
【问题讨论】:
-
@MohammedAlaa 那将在浏览器中打开。但我想让链接在 webview 中打开。
标签: java android html hyperlink textview