我想創建一個 TextView,只需幾個可點擊的單詞。當用戶單擊該鏈接時,將創建一個 Web 視圖。
我也想更改鏈接的顏色。
在 HTML 中,我可以這樣做:
<p>By checking this box, I acknowledge that I have reviewed the <a href="To the other page"> Online Payment Terms & Conditions</a> and agree.</p>
我如何在 Android Studio 中創建它?
到目前為止我所擁有的:
- 布局 XML:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/terms_condition_message"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
- 字串.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name"terms_condition_message"><