在我的应用程序中,我有一个带下划线文字的textview,也有另一个像下面这样的普通textview
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pp"
android:layout_margin="10dp"
android:onClick="showPrivacyPolicy"
android:clickable="true"
android:text="@string/privacy_policy_underline"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pp_no_underline"
android:layout_margin="10dp"
android:clickable="true"
android:onClick="showPrivacyPolicy"
android:text="@string/privacy_policy_no_underline"/>
</LinearLayout>
并使用以下来自strings.xml的字符串
<string name="privacy_policy_underline"><u>Privacy Policy</u></string>
<string name="privacy_policy_no_underline">Privacy Policy</string>
当用户单击上方的任意一个时,它会显示条款和条件文本。现在,当用户启用辅助功能并选择以上任意文本时,系统会用相同的发音拼写两个文本视图。 此处可访问性与下划线文本和普通文本相同。用户如何区分下划线文本和普通文本