Intercepts an {@link View#onLayout(boolean, int, int, int, int)} call on the
given {@link View}. By default, it simply calls the view's original method.
320379
public void onLayout(View view, boolean changed, int l, int t, int r, int b) {
        invokeOnLayout(view, changed, l, t, r, b);
    }
1165449
protected <View> void invokeAnnotatedViewMethods(final View view, final Class<? extends Annotation> annotation) {
        Class<?> handledClass = view.getClass();
        try {
            while (handledClass != null && !handledClass.equals(Object.class)) {
                for (final Method method : ClassReflection.getDeclaredMethods(handledClass)) {
                    if (Reflection.isAnnotationPresent(method, annotation)) {
                        invokeAnnotatedViewMethod(view, method);
                    }
                }
                handledClass = handledClass.getSuperclass();
            }
        } catch (final Exception exception) {
            throw new GdxRuntimeException("Unable to invoke method annotated with: " + annotation, exception);
        }
    }
871117
private void onAttached(View view) {
    decorView.addView(view);
    contentContainer.startAnimation(inAnim);

    contentContainer.requestFocus();
    holder.setOnKeyListener(new View.OnKeyListener() {
      @Override public boolean onKey(View v, int keyCode, KeyEvent event) {
        switch (event.getAction()) {
          case KeyEvent.ACTION_UP:
            if (keyCode == KeyEvent.KEYCODE_BACK) {
              if (onBackPressListener != null) {
                onBackPressListener.onBackPressed(DialogPlus.this);
              }
              if (isCancelable) {
                onBackPressed(DialogPlus.this);
              }
              return true;
            }
            break;
          default:
            break;
        }
        return false;
      }
    });
  }
361068
public final boolean isViewSufficientlyShown(View view){
		final int[] xyView = new int[2];
		final int[] xyParent = new int[2];

		if(view == null)
			return false;

		final float viewHeight = view.getHeight();
		final View parent = getScrollOrListParent(view);
		view.getLocationOnScreen(xyView);

		if(parent == null){
			xyParent[1] = 0;
		}
		else{
			parent.getLocationOnScreen(xyParent);
		}

		if(xyView[1] + (viewHeight/2.0f) > getScrollListWindowHeight(view))
			return false;

		else if(xyView[1] + (viewHeight/2.0f) < xyParent[1])
			return false;

		return true;
	}
735834
@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
	
		super.onViewCreated(view, savedInstanceState);
		EventUtils.link(EVENT_CONFIGURATION);
	}
858922
public void onItemClick() {
        if (selected) {
            selected = false;
            getView().reset();

            if (onResetCommand != null) {
                onResetCommand.execute();
            }
        }
        else {
            selected = true;
            getView().select();

            if (onSelectCommand != null) {
                onSelectCommand.execute();
            }
        }
    }
271030
@Override
    public boolean onTouchEvent(MotionEvent ev) {
        try {
            if (ev == null || getAdapter() == null || getAdapter().getCount() == 0) {
                return false;
            }
            return super.onTouchEvent(ev);
        } catch (RuntimeException e) {
            Log.e(TAG, "Exception during WrapContentViewPager onTouchEvent: " +
                    "index out of bound, or nullpointer even if we check the adapter before " + e.toString());
            return false;
        }
    }
284404
public void setViewPager(@Nullable ViewPager view) {
        if (mViewPager == view)
            return;

        if (mViewPager != null){
            mViewPager.removeOnPageChangeListener(this);
            PagerAdapter adapter = mViewPager.getAdapter();
            if(adapter != null)
            	adapter.unregisterDataSetObserver(mObserver);
        }

        mViewPager = view;

        if(mViewPager != null) {
            PagerAdapter adapter = mViewPager.getAdapter();
            if (adapter == null)
                throw new IllegalStateException("ViewPager does not have adapter instance.");

            adapter.registerDataSetObserver(mObserver);

            mViewPager.addOnPageChangeListener(this);

            notifyDataSetChanged();
            onPageSelected(mViewPager.getCurrentItem());
        }
        else
            mTabContainer.removeAllViews();
    }
1062720
@UiThread
  @SafeVarargs public static <T extends View> void run(@NonNull T view,
      @NonNull Action<? super T>... actions) {
    for (Action<? super T> action : actions) {
      action.apply(view, 0);
    }
  }
509992
@SuppressWarnings("unchecked")
	public <V extends View> V findView(View containerView, int id) {
		return (V)containerView.findViewById(id);
	}
564774
@Override
    protected View onCreateView(String name, AttributeSet attrs) throws ClassNotFoundException {
        // This mimics the {@code PhoneLayoutInflater} in the way it tries to inflate the base
        // classes, if this fails its pretty certain the app will fail at this point.
        View view = null;
        for (String prefix : CLASS_PREFIX_LIST) {
            try {
                view = createView(name, prefix, attrs);
            } catch (ClassNotFoundException ignored) {
            }
        }
        // In this case we want to let the base class take a crack
        // at it.
        if (view == null) view = super.onCreateView(name, attrs);

        return mDecorFactory.onViewCreated(view, name, null, view.getContext(), attrs);
    }
1242527
public static void removeFromParent(@NonNull final View view) {
        Condition.INSTANCE.ensureNotNull(view, "The view may not be null");
        ViewParent parent = view.getParent();

        if (parent instanceof ViewGroup) {
            ((ViewGroup) parent).removeView(view);
        }
    }
423910
public void setHeader(@NonNull View view, boolean padding, boolean divider) {
        setHeader(view, padding, divider, null);
    }
265426
public void onResume(Object view) {
        getPresenter();
        if (presenter != null && !presenterHasView) {
            //noinspection unchecked
            presenter.takeView(view);
            presenterHasView = true;
        }
    }
995727
public void onViewSetup(NotificationView view) {
        if (DBG) Log.v(TAG, "onViewSetup");

        view.setCornerRadius(8.0f);
        view.setContentMargin(50, 50, 50, 50);
        view.setShadowEnabled(true);
    }
1327273
protected void onItemLongClick(View view, int position){
        if(itemLongClickListener != null) itemLongClickListener.onItemLongClick(view, getItem(position), position);
    }
702289
public void setContentView(View view) {
        setContentView(view, new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    }