1

I have a custom view with four Textview inside a constraint layout.
The problem is that i´m implementing accessibility, and this view must be a child of some kind of button, to inherit the behavior of "..., Button" sayd by Talkback. Is there a way to convert a view to type Button? Or any way to make the talkback recognize this view as a Button?

My xml is like this:

<ConstraintLayout>
  <CustomViewGroup>
    <AppCompatTextView>
  </CustomViewGroup>
  <CustomViewGroup>
    <AppCompatTextView>
  </CustomViewGroup>
  <CustomViewGroup>
    <AppCompatTextView>
  </CustomViewGroup>
  <CustomViewGroup>
    <AppCompatTextView>
  </CustomViewGroup>
  <View>
</ConstraintLayout>

1 Answers1

0

Your customview should extend "Button" class. Or you can use contentDescription. On each text view, add a content description with the text you wish (like: "action one button")

Filipe Oliveira
  • 850
  • 7
  • 13
  • The first option is good. The second one is not. Is not good to force the type of view just in the ContentDescription. There should be a code to say a custom view that it is a Button, and the talkback recognize it as a Button... – Bruno Fernandez Ellerbach Jul 03 '20 at 18:54