Java tutorial
//package com.java2s; import android.view.accessibility.AccessibilityNodeInfo; import java.util.List; public class Main { public static AccessibilityNodeInfo findNodeInfoByText(AccessibilityNodeInfo nodeInfo, String text) { List<AccessibilityNodeInfo> list = nodeInfo.findAccessibilityNodeInfosByText(text); if (list == null || list.isEmpty()) { return null; } return list.get(0); } }