java - When I set a content descriptor on a button subclass in Android, the word "button" gets appended on TalkBack -
i trying talkback read content descriptor on button subclass. 1 time button subclass selected, talkback gives me content descriptor plus word "button" @ end. how prevent word beingness appended?
note: did doc reading , noticed dispathpopulateaccessibilityevent() mentions getting accessibilityevent populated/visiting children of view acted event trigger. mean event touches view hierarchy?, , if so, button superclass adding text?
a simple workaround avoid using button
, causes words added.
for example, may able replace textview
, made button, , add together click listener using view.setonclicklistener(listener)
desired effect - see android docs.
there number of such listeners in basic view
class can added ui component using view.seton<event>listener(listener)
in activity.oncreate
method. in case, double-tap listener constructed ontouchlistener
, though may require little experimentation precise result want.
java android button accessibility talkback
No comments:
Post a Comment