List of usage examples for android.view.accessibility AccessibilityNodeInfo ACTION_ARGUMENT_SELECTION_END_INT
String ACTION_ARGUMENT_SELECTION_END_INT
To view the source code for android.view.accessibility AccessibilityNodeInfo ACTION_ARGUMENT_SELECTION_END_INT.
Click Source Link
From source file:com.google.android.marvin.screenspeak.ScreenSpeakService.java
public void resetFocusedNode(long delay) { final Handler handler = new Handler(); handler.postDelayed(new Runnable() { @SuppressLint("InlinedApi") @Override//from www . jav a 2 s.co m public void run() { AccessibilityNodeInfoCompat node = mSavedNode.getNode(); if (node == null) { return; } AccessibilityNodeInfoCompat refreshed = AccessibilityNodeInfoUtils.refreshNode(node); if (refreshed != null) { if (!refreshed.isAccessibilityFocused()) { mCursorController.setGranularity(mSavedNode.getGranularity(), refreshed, false); SavedNode.Selection selection = mSavedNode.getSelection(); if (selection != null) { Bundle args = new Bundle(); args.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_START_INT, selection.start); args.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_END_INT, selection.end); PerformActionUtils.performAction(refreshed, AccessibilityNodeInfoCompat.ACTION_SET_SELECTION, args); } PerformActionUtils.performAction(refreshed, AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS); } refreshed.recycle(); } mSavedNode.recycle(); } }, delay); }