diff --git a/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt b/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt index 138b459..f50424c 100644 --- a/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt +++ b/app/src/main/java/org/yameida/worktool/utils/AccessibilityUtil.kt @@ -269,6 +269,7 @@ object AccessibilityUtil { var index = 0 while (index++ < maxRetry) { performScrollDown(nodeInfo, 0) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node @@ -277,6 +278,7 @@ object AccessibilityUtil { index = 0 while (index++ < maxRetry * 2) { performScrollUp(nodeInfo, 0) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node @@ -289,6 +291,7 @@ object AccessibilityUtil { index = 0 while (index++ < maxRetry * 2) { scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, -height / 3) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node @@ -297,6 +300,7 @@ object AccessibilityUtil { index = 0 while (index++ < maxRetry * 3) { scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, height / 3) + nodeInfo.refresh() val node = findOnceByText(nodeInfo, *textList, exact = exact) if (node != null) { return node