Skip to content
Advertisement

TextView setContentDescription not working

I’m trying to set the contentDescription on a TextView but it doesn’t seem to be announced by TalkBack. TalkBack is only vocalizing the text content.

JavaScript

The second line above has no effect. TalkBack says, “2d 9h left”.

I’ve also tried the following:

JavaScript

but this results in TalkBack announcing “2days 9hours left 2d 9h left”, which is also incorrect.

Advertisement

Answer

The only that worked for me is AccessibilityDelegate (Kotlin):

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement