0

we have custom view which is exposing the content to Talkback using android's virtual view hierarchy. As part of the canvas (as a descendent) we have some standard controls like Buttons. These buttons are not getting exposed in the UI hierarchy. So talkback is not reading these controls. Is there any way to expose them through the virtual view hierarchy of custom view? Thanks Sandeep

  • Yes- you need to override getAccessibilityNodeProvider() and provide a AccessibilityNodeProvider for the structure. – Gabe Sechan Apr 21 '16 at 12:22
  • Thanks Gabe. if I understand correctly the node corresponding the Canvas View would have getAccessibilityNodeProvider() implemented to build the virtual view hierarchy. But what if my Canvas extends from Viewgroup/RelativeLayout and has a standard control like Button as part of its descendants. How to expose the button as part of the virtual view hierarchy of Canvas? – user2110308 Apr 22 '16 at 12:21
  • Android does not currently support mixed real and virtual children, so you would need to provide virtual nodes for the descendants. – alanv Apr 28 '16 at 15:26

0 Answers0