This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Ataul Munim edited this page Mar 18, 2016
·
6 revisions
- Check if TalkBack (or other spoken feedback accessibility service) is enabled
- Reports as enabled even if TalkBack is suspended
AccessibilityServices services = AccessibilityServices.newInstance(context);
services.isSpokenFeedbackEnabled();
- a wrapper around View actions to facilitate actions via dialog or TalkBack local gestures menu
First create Actions
. It's necessary to give each Action
a unique resource ID (required by AccessibilityActionCompat
see ActionsAccessibilityDelegate
), and a display label.
Actions actions = // ...
AccessibilityDelegateCompat delegate = new ActionsAccessibilityDelegate(getResources(), actions);
ViewCompat.setAccessibilityDelegate(this, delegate);
// ...
// if TalkBack is enabled, display dialog on click
private void showAlertDialogFor(Actions actions) {
new ActionsAlertDialogCreator(getContext(), R.string.tweet_actions_title, actions)
.create()
.show();
}