Code example for ViewParent

Methods: getParent

   * @param view the view whose parent to return 
   * @return the parent of {@code view}, or {@code null} if it has no parent 
  protected ViewParent getViewParent(ViewParent view) {
    return view.getParent();
   * Tests if the first {@code View} is the same as, or somewhere inside the 
   * {@code View} hierarchy of, the second {@code View}. 
  public boolean viewIsSameOrDescendant(View child, View parent) {
    if (child == parent) {
      return true; 
Connect your IDE to all the code out there  Get Codota for Java