0

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

4

1 回答 1

1

您不能使用 AccessibilityNodeInfo.performAction() 来指定搜索栏位置。ACTION_SET_SELECTION 动作仅在 TextView 中实现。

于 2014-03-31T23:24:10.847 回答