문제

I can not find an answer to what should be a very simple task. Can someone explain to me the best way to turn off accessibility (talkback) for an individual element in android?

I have a TextView that I programmatically set the contentDescription to nil, and it keeps talkback from saying the title, but when navigating through the view it still stops on that textview.. it just stays silent.

My goal is to have talkback completely ignore that the TextView exists.

Please help!

Thank you :)

도움이 되었습니까?

해결책

In your XML file, set the importance to "no". You can also do this at run time using the View.setImportantForAccessibility() API.

<TextView
    android:importantForAccessibility="no"
    ... />

다른 팁

Programmatically you can say:

view.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top