List of usage examples for android.view View getLabelFor
@ViewDebug.ExportedProperty(category = "accessibility") public int getLabelFor()
From source file:com.google.android.apps.common.testing.accessibility.framework.ViewAccessibilityUtils.java
private static View lookForLabelForViewInViewAndChildren(View view, View childToSkip, int idToFind) { if (view.getLabelFor() == idToFind) { return view; }/*from www. j a v a 2 s .c om*/ if (!(view instanceof ViewGroup)) { return null; } ViewGroup viewGroup = (ViewGroup) view; for (int i = 0; i < viewGroup.getChildCount(); ++i) { View child = viewGroup.getChildAt(i); if (!child.equals(childToSkip)) { View labelingView = lookForLabelForViewInViewAndChildren(child, null, idToFind); if (labelingView != null) { return labelingView; } } } return null; }