1

I have a layout with two AutoCompleteTextViews, when I type in upper AutoCompleteTextView, a popup window of suggestions is shown and it will hide the lower AutoCompleteTextViews. This has no problem until I enable Talkback. When talkback is enabled, accessibility will traverse the lower (hidden) AutoCompleteTextView before traversing the suggestions. Does anyone know how I can change the traversal order here so that talkback will announce the suggestions before announcing the hidden AutoCompleteTextView?

enter image description here after

    <TextView
    android:id="@+id/textView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Autocomplete Demo"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintHorizontal_bias="0.498"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintVertical_bias="0.158" />

<AutoCompleteTextView
    android:id="@+id/autoCompleteTextView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/textView2"
    android:layout_alignLeft="@+id/textView2"
    android:importantForAccessibility="yes"
    android:ems="10"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_bias="0.497"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textView"
    app:layout_constraintVertical_bias="0.126"
    tools:ignore="MissingConstraints,UnknownId" />

<AutoCompleteTextView
    android:id="@+id/autoCompleteTextView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/textView2"
    android:layout_alignLeft="@+id/textView2"
    android:importantForAccessibility="yes"
    android:accessibilityTraversalAfter="@android:id/text1"
    android:ems="10"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_bias="0.497"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/autoCompleteTextView1"
    app:layout_constraintVertical_bias="0.027"
    tools:ignore="MissingConstraints,UnknownId" />
1
  • Seems like this question does not have answer at the moment. The suggestions are shown in a popupWindow and Accessbility does not support rearranging traversal order between different windows. Commented Sep 1, 2020 at 6:20

1 Answer 1

2

This is still not fixed for AutoCompleteTextView (regular and AppCompat), but it works properly if you use com.google.android.material.textfield.MaterialAutoCompleteTextView instead.

Focus will lock in to the PopupWindow and cycle through the array of dropdown items.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.