android - Set contentDescription for a custom dialog -


how can set contentdescription read accessibility service when dialog opened? i'm using dialog custom layout display blocking laoding screen , spoken contentdescription "alert", not appropriate in circumstance.

thanks ;)

you can create subclass dialog , override dispatchpopulateaccessibilityevent provide own accessibility text.

here's example:

@override public boolean dispatchpopulateaccessibilityevent(accessibilityevent event) {     if (event.geteventtype() == accessibilityevent.type_window_state_changed) {         event.gettext().add("your message goes here");         return true;     }     return super.dispatchpopulateaccessibilityevent(event); } 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -