你可以试试其他方法,java的这个
Rect bounds = new Rect();
textNodeInfoList.get(0).getBoundsInScreen(bounds);
int x = bounds.centerX();
int y = bounds.centerY();
GestureDescription.Builder gestureBuilder = new GestureDescription.Builder();
Path path = new Path();
path.moveTo(x, y);
gestureBuilder.addStroke(new GestureDescription.StrokeDescription(path, 0, 100));
GestureDescription gestureDescription = gestureBuilder.build();
dispatchGesture(gestureDescription, new GestureResultCallback() {
@Override
public void onCompleted(GestureDescription gestureDescription) {
super.onCompleted(gestureDescription);
// 点击完成后的操作
}
});