32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
1.左滑动操作
|
|
// AblViewUtil.onMessage("不满足点赞关注评论条件");
|
|
// AblViewUtil.scrollHorizontal(10, 500, 100, 300, new GestureCallBack() {
|
|
// @Override
|
|
// public void succ(GestureDescription gestureDescription) {
|
|
//
|
|
// }
|
|
//
|
|
// @Override
|
|
// public void fail(GestureDescription gestureDescription) {
|
|
//
|
|
// }
|
|
// });
|
|
|
|
|
|
2.坐标点点击
|
|
AblService.getInstance().clickPoint(659, 666, 300);//红米7a
|
|
|
|
@RequiresApi(api = Build.VERSION_CODES.N)
|
|
public void clickcommontwo(AccessibilityNodeInfo accessibilityNodeInfo, String s) {
|
|
if (accessibilityNodeInfo!=null) {
|
|
Rect rect = new Rect();
|
|
accessibilityNodeInfo.getBoundsInScreen(rect);
|
|
this.clickPoint((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2, 300);
|
|
Log.e("TIAOSHI###", "点击"+s+"按钮"+ "("+ (rect.left + rect.right) / 2 + "," + (rect.top + rect.bottom) / 2 + ")");
|
|
// ToastUtils.showShort("点击"+s+"按钮"+ "("+ (rect.left + rect.right) / 2 + "," + (rect.top + rect.bottom) / 2 + ")");
|
|
} else {
|
|
Log.e("TIAOSHI###", "没有找到"+s+"按钮,直接退出了。。。。");
|
|
return;
|
|
}
|
|
}
|