Example usage for android.view.accessibility AccessibilityNodeInfo ACTION_ARGUMENT_PROGRESS_VALUE

List of usage examples for android.view.accessibility AccessibilityNodeInfo ACTION_ARGUMENT_PROGRESS_VALUE

Introduction

In this page you can find the example usage for android.view.accessibility AccessibilityNodeInfo ACTION_ARGUMENT_PROGRESS_VALUE.

Prototype

String ACTION_ARGUMENT_PROGRESS_VALUE

To view the source code for android.view.accessibility AccessibilityNodeInfo ACTION_ARGUMENT_PROGRESS_VALUE.

Click Source Link

Document

Argument for specifying the progress value to set.

Usage

From source file:com.android.talkback.menurules.RuleSeekBar.java

static void setProgress(AccessibilityNodeInfoCompat node, int progress) {
    RangeInfoCompat rangeInfo = node.getRangeInfo();
    if (rangeInfo != null && progress >= 0 && progress <= 100) {
        Bundle args = new Bundle();
        args.putFloat(AccessibilityNodeInfo.ACTION_ARGUMENT_PROGRESS_VALUE,
                percentToReal(progress, rangeInfo.getMin(), rangeInfo.getMax()));
        PerformActionUtils.performAction(node, AccessibilityAction.ACTION_SET_PROGRESS.getId(), args);
    }/*from   ww w.  j  a  v  a  2s  .c om*/
}