【问题标题】:Android talk back announcing incorrect content description for TextInputLayout when the the input type of EditText is password当 EditText 的输入类型为密码时,Android 回声宣布 TextInputLayout 的内容描述不正确
【发布时间】:2021-05-16 11:16:02
【问题描述】:

我的 android 应用中有一个具有以下结构的 TextInputLayout。

<com.google.android.material.textfield.TextInputLayout
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent">

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:imeOptions="actionDone"
        android:id="@+id/mEdit"
        android:inputType="numberPassword"
        android:maxLength="4"
        android:singleLine="true"
        app:layout_constraintTop_toTopOf="parent" />

</com.google.android.material.textfield.TextInputLayout>

这里maxLength 的EditText 是4。但是,在启用回复后,如果我们尝试在密码字段中编辑某些内容,那么即使我们没有达到 @ 987654326@ 的EditText。

提前感谢您的宝贵意见。

【问题讨论】:

    标签: android android-edittext android-textinputlayout talkback android-accessibility


    【解决方案1】:

    使用com.google.android.material.textfield.TextInputEditText 而不是在TextInputLayout 中使用EditText。

    【讨论】:

      猜你喜欢
      • 2016-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-01
      • 2018-02-24
      • 2016-08-02
      • 2021-06-16
      相关资源
      最近更新 更多