Reputation: 159
I'm developing an accessibility service with similar features to touch to explore.
I can focus menu and home screen icons with
public void updateViewNodes(AccessibilityNodeInfo source) {
source.performAction(AccessibilityNodeInfo.ACTION_FOCUS);
The problem is when i reach a listview (for example the settings menu), where the children don't have the tag focusable, they only have the
ACTION_ACCESSIBILITY_FOCUS
If i use ACTION_ACCESSIBILITY_FOCUS instead of ACTION_FOCUS it simply doesn't focus anything returning always false and i have no idea why.
Thank you in advance for your help.
Upvotes: 2
Views: 4429
Reputation: 24114
Accessibility focus is only supported when Explore by Touch is enabled. See the implementation details at View.java#6601. There is no workaround, but the net result is simply that you can't control the yellow focus highlight. You can still perform other accessibility actions including ACTION_CLICK.
Upvotes: 3