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