问题
I am new at working with the accessibility library of android i have a lot of troubles. But there is one i think is not my fault: I want to use the accessibilitynodeinfo to start a seekbar from the middle:
if(mychildinfo.getClassName().toString().contains("SeekBar")){
Bundle b = new Bundle();
b.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_START_INT, 49);
b.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_END_INT, 50);
mychildinfo.performAction(AccessibilityNodeInfo.ACTION_SET_SELECTION,b);
}
but it doesn't work and i don't get any feedback of something to be wrong in my code? Can anybody help me, please?
I use android 4.4.2 in Nexus 5
回答1:
You cannot use AccessibilityNodeInfo.performAction() to specify seek bar position. The ACTION_SET_SELECTION action is only implemented in TextView.
来源:https://stackoverflow.com/questions/22765040/performaction-action-set-selection-not-working-properly