I'm currently developing a book reader Android Application and I have some issue with setImportantForAccessibility function, the official documentation doesn't help much.
setImportantForAccessibility(link is external)
In my application, I have a ViewGroup
which contains a WebView
, that I wish to set dynamically the "importantForAccessibility" property, the problem is: once I set the ViewGroup
to View.IMPORTANT_FOR_ACCESSIBILITY_YES
, it seems to be impossible to change that value to View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
. The View always get read by the talkback program even if isImportantForAccessibility()
returns false.
I googled a lot on this subject but didn't find anything that can answer my question.
Thanks for the help.