update 滚动查询文本
This commit is contained in:
@@ -269,6 +269,7 @@ object AccessibilityUtil {
|
|||||||
var index = 0
|
var index = 0
|
||||||
while (index++ < maxRetry) {
|
while (index++ < maxRetry) {
|
||||||
performScrollDown(nodeInfo, 0)
|
performScrollDown(nodeInfo, 0)
|
||||||
|
nodeInfo.refresh()
|
||||||
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
return node
|
return node
|
||||||
@@ -277,6 +278,7 @@ object AccessibilityUtil {
|
|||||||
index = 0
|
index = 0
|
||||||
while (index++ < maxRetry * 2) {
|
while (index++ < maxRetry * 2) {
|
||||||
performScrollUp(nodeInfo, 0)
|
performScrollUp(nodeInfo, 0)
|
||||||
|
nodeInfo.refresh()
|
||||||
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
return node
|
return node
|
||||||
@@ -289,6 +291,7 @@ object AccessibilityUtil {
|
|||||||
index = 0
|
index = 0
|
||||||
while (index++ < maxRetry * 2) {
|
while (index++ < maxRetry * 2) {
|
||||||
scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, -height / 3)
|
scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, -height / 3)
|
||||||
|
nodeInfo.refresh()
|
||||||
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
return node
|
return node
|
||||||
@@ -297,6 +300,7 @@ object AccessibilityUtil {
|
|||||||
index = 0
|
index = 0
|
||||||
while (index++ < maxRetry * 3) {
|
while (index++ < maxRetry * 3) {
|
||||||
scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, height / 3)
|
scrollByXY(service, width / 2, (height / 2.2).toInt(), 0, height / 3)
|
||||||
|
nodeInfo.refresh()
|
||||||
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
val node = findOnceByText(nodeInfo, *textList, exact = exact)
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
return node
|
return node
|
||||||
|
|||||||
Reference in New Issue
Block a user