So I have a SeekBar
in my app and I'm using the TalkBack function of Android. When the SeekBar
is scrolled, the device says "(android:contentDescription of view), SeekBar control, 50%". Is it possible to change it so it says the actual value (from -4 to +4), like "SeekBar control, negative 4"?
If you're using a SeekBar, I figure you're tracking the value somewhere. In our case, there is a TextView above the SeekBar that displays the current value derived from the SeekBar's progress.
I've found that setting android:accessibilityLiveRegion="assertive"
as an attribute for the TextView works perfectly. It results an an announcement of the updated value (since the TextView is update), followed by the SeekBar's progress.
Note: Setting android:accessibilityLiveRegion
to assertive
was appropriate for us because it's less time consuming for a user to rapidly change the SeekBar's progress. Setting it to polite
announces every increment, while assertive
skips unannounced increments to the most recent.
Though not the perfect answer, I found this useful method: https://developer.android.com/reference/android/view/View.html#announceForAccessibility(java.lang.CharSequence)
Which basically makes the TalkBack function talk during a specific event. I added this in the OnSeekBarChangeListener to make it "talk" every time I change the value of the slider.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With