Android Question How to run: view.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);

rosippc64a

Active Member
Licensed User
Longtime User
Hi all,
I just discovered the talkback on TV smart box related to blind and visually impaired persons (of course I knew that on phones and tablets), but I would like to turn off. I made a well working app for reading news, books etc, but when the talkback is turned on, this is annoying because my program is speaking also.
I would like to turn off when my program is working, so my question:
How can I apply that
B4X:
view.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
for my customlistview, edittext, panel, etc?
I found the list of constants:
Constant Value Description
auto 0 The system determines whether the view is important for accessibility - default (recommended).
no 2 The view is not important for accessibility.
noHideDescendants 4 The view is not important for accessibility, nor are any of its descendant views.
yes 1 The view is important for accessibility.
The solution here for customlistview:
B4X:
Sub off
    Dim r As Reflector
    r.Target = clv1.GetBase
    Log( r.RunMethod2("setImportantForAccessibility", 2, "java.lang.int"))
End Sub
No question yet, while I type here, I solve the problem, Thank you! :)
Maybe will be good for others :)
 
Top