Java Code Examples for android.view.View#getLabelFor()

The following examples show how to use android.view.View#getLabelFor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ViewAccessibilityUtils.java    From Accessibility-Test-Framework-for-Android with Apache License 2.0 6 votes vote down vote up
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1) // Calls View#getLabelFor
private static @Nullable View lookForLabelForViewInViewAndChildren(
    View view, @Nullable View childToSkip, int idToFind) {
  if (view.getLabelFor() == idToFind) {
    return view;
  }
  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;
}
 
Example 2
Source File: ViewCompatJellybeanMr1.java    From letv with Apache License 2.0 4 votes vote down vote up
public static int getLabelFor(View view) {
    return view.getLabelFor();
}
 
Example 3
Source File: an.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public static int a(View view)
{
    return view.getLabelFor();
}
 
Example 4
Source File: ViewCompatJellybeanMr1.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static int getLabelFor(View view) {
    return view.getLabelFor();
}
 
Example 5
Source File: ViewCompatJellybeanMr1.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static int getLabelFor(View view) {
    return view.getLabelFor();
}
 
Example 6
Source File: ViewCompatJellybeanMr1.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public static int getLabelFor(View view) {
    return view.getLabelFor();
}
 
Example 7
Source File: ViewCompatJellybeanMr1.java    From guideshow with MIT License 4 votes vote down vote up
public static int getLabelFor(View view) {
    return view.getLabelFor();
}