Android examples for User Interface:AccessibilityEvent
find Parent Accessibility Node Information By Class Name
//package com.java2s; import android.text.TextUtils; import android.view.accessibility.AccessibilityNodeInfo; public class Main { public static AccessibilityNodeInfo findParentNodeInfosByClassName( AccessibilityNodeInfo nodeInfo, String className) { if (nodeInfo == null) { return null; }//from w w w .ja v a 2s. com if (TextUtils.isEmpty(className)) { return null; } if (className.equals(nodeInfo.getClassName())) { return nodeInfo; } return findParentNodeInfosByClassName(nodeInfo.getParent(), className); } }