Returns true if the view is sufficiently shown

@param view the view to check
@return true if the view is sufficiently shown
15227
public final boolean isWebElementSufficientlyShown(WebElement webElement){
		final WebView webView = viewFetcher.getFreshestView(viewFetcher.getCurrentViews(WebView.class, true));
		final int[] xyWebView = new int[2];

		if(webView != null && webElement != null){
			webView.getLocationOnScreen(xyWebView);

			if(xyWebView[1] + webView.getHeight() > webElement.getLocationY())
				return true;
		}
		return false;
	}
395149
private function checkView()
    {
        exception_if((is_null($this->mailable->get('_view')) && is_null($this->mailable->get('_text'))), MailViewNotFoundException::class);
    }
294917
public void setClearView(View view) {
        mClearView = view;
        if (view != null) {
            view.setVisibility(mOpened ? VISIBLE : INVISIBLE);
            view.setOnClickListener(mOnClickListenerClearView);
        }
    }
800167
private void logIsShownCheckFailure(View view) {
    try {
      SelendroidLogger.debug("Display check failed because View.isShown() == false");
      View current = view;
      do {
        if ((current.getVisibility()) != View.VISIBLE) {
          SelendroidLogger.debug(String.format(
              "isShown: View %s is not visible because its ancestor %s has visibility %d",
              view, current, current.getVisibility()));
          break;
        }
        ViewParent parent = current.getParent();
        if (parent == null) {
          SelendroidLogger.debug(String.format(
              "isShown: View %s is not visible because its ancestor %s has no parent " +
                  "(it is not attached to view root): ",
              view, current));
          break;
        }
        if (!(parent instanceof View)) {
          // The only case where View.isShown() returns true:
          // The view needs to have an ancestor that is not a View and all ancestors on the way up have to
          // be visible.
          break;
        }
        current = (View) parent;
      } while (current != null);
      SelendroidLogger.debug(String.format("View %s is not visible", view));
    } catch (Exception e) {
      // Don't let an exception in debug printing crash the caller
      SelendroidLogger.error("isShown() debug printing failed", e);
    }
  }
238074
static int measureViewHeight(@Nullable View view) {
        int height = 0;
        if (view != null && view.isShown()) {
            ViewGroup.MarginLayoutParams modeSelectionParams = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
            height = view.getMeasuredHeight() + modeSelectionParams.topMargin + modeSelectionParams.bottomMargin + view.getPaddingTop() + view.getPaddingBottom();
        }
        return height;
    }
956234
public static boolean isPointInsideView(float x, float y, View view) {
        int location[] = new int[2];
        view.getLocationOnScreen(location);
        int viewX = location[0];
        int viewY = location[1];

        //point is inside view bounds
        if ((viewX < x && x < (viewX + view.getWidth())) &&
                (viewY < y && y < (viewY + view.getHeight()))) {
            return true;
        } else {
            return false;
        }
    }
1361929
public void setContentView(View view) {
        this.mContentView = view;
        ViewGroup.LayoutParams params = view.getLayoutParams();
        if (params == null) {
            params = new ViewGroup.LayoutParams(-1, -2);
        } else {
            params.width = -1;
            params.height = -2;
        }
        this.mContentView.setLayoutParams(params);
    }
257942
public static void showLoading(@NonNull View loadingView, @NonNull View contentView,
      @NonNull View errorView) {

    contentView.setVisibility(View.GONE);
    errorView.setVisibility(View.GONE);
    loadingView.setVisibility(View.VISIBLE);
  }
378614
public <T extends View> boolean waitForView(View view){
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "waitForView("+view+")");
		}
		
		return waiter.waitForView(view);
	}
461747
public boolean removeFooterView(View v) {
        if (mFooterViewInfos.size() > 0) {
            boolean result = false;
            ListAdapter adapter = getAdapter();
            if (adapter != null && ((HeaderFooterViewGridAdapter) adapter).removeFooter(v)) {
                result = true;
            }
            removeFixedViewInfo(v, mFooterViewInfos);
            return result;
        }
        return false;
    }
29298
@SuppressLint("NewApi")
    protected static boolean isActionBarTitle(TextView view) {
        if (matchesResourceIdName(view, ACTION_BAR_TITLE)) return true;
        if (parentIsToolbarV7(view)) {
            final android.support.v7.widget.Toolbar parent = (android.support.v7.widget.Toolbar) view.getParent();
            return TextUtils.equals(parent.getTitle(), view.getText());
        }
        return false;
    }
1232601
private static boolean isViewDescendantOf(View child, View parent) {
		if (child == parent) {
			return true;
		}

		final ViewParent theParent = child.getParent();
		return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent);
	}
1023210
public void attachView(View view) {
		if (view == null) {
			throw new IllegalArgumentException("Mvp view must be not null");
		}

		boolean isViewAdded = mViews.add(view);

		if (!isViewAdded) {
			return;
		}

		mInRestoreState.add(view);

		Set<ViewCommand<View>> currentState = mViewStates.get(view);
		currentState = currentState == null ? Collections.<ViewCommand<View>>emptySet() : currentState;

		restoreState(view, currentState);

		mViewStates.remove(view);

		mInRestoreState.remove(view);
	}
221321
public boolean setVisibility(final Visibility visibility) {
        if (visibility != mVisibility) {
            Log.d(Log.SUBSYSTEM.WIDGET, TAG, "setVisibility(%s) for %s", visibility, getName());
            updateVisibility(visibility);
            mVisibility = visibility;
            return true;
        }
        return false;
    }
1039427
def is_valid_method_view(endpoint):
    
    klass = endpoint.__dict__.get('view_class', None)
    try:
        return issubclass(klass, MethodView)
    except TypeError:
        return False
857280
function hasViewResult( $view = '' )
    {
        if ( $view == '' )
            $view = $this->currentView();
        return isset( $this->ViewResult[$view] );
    }
126639
public void registerView(final Class ownerClass, final Pair<View, View> view) {
        registerView(ownerClass.getSimpleName(), view);
    }