0

I have a linear layout inside an alert dialog along with othr views. I have set the content description of that linear layout. Still talkback focus does not come on it. but when the alert dialog is loaded it pronounces content description of all the views inside it including this linear layout also. How can I set the linear layout focuusable for talkback seperately?

GHC
  • 2,658
  • 5
  • 30
  • 35
Akash Dubey
  • 327
  • 4
  • 5

1 Answers1

1

I've run into a similar problem recently.

  1. Make your target LinearLayout focusable by adding the following line to the XML:

    android:focusable="true"

  2. Use View.requestFocus() when the alert dialog opens to move focus to that LinearLayout.

There's a more detailed explanation in my original answer to Android: How to force Explore-By-Touch/Talkback to repeat the ContentDescription of the current View in AccessibilityFocus? which may provide some helpful additional information.

Community
  • 1
  • 1
AwayTeam
  • 439
  • 5
  • 13