protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint) { final Rect frame = new Rect(); child.getHitRect(frame); return frame.contains((int) x, (int) y); }
private boolean isTouchOnSurface(MotionEvent ev) { View surfaceView = getSurfaceView(); if (surfaceView == null) { return false; } if (hitSurfaceRect == null) { hitSurfaceRect = new Rect(); } surfaceView.getHitRect(hitSurfaceRect); return hitSurfaceRect.contains((int) ev.getX(), (int) ev.getY()); }
static View getTheVisibileView(List<View> viewList) { Rect scrollBounds = new Rect(); int listSize = viewList.size(); for (int i = 0; i < listSize; ++i) { View view = viewList.get(i); if (view != null) { view.getHitRect(scrollBounds); if (view.getLocalVisibleRect(scrollBounds)) { return view; } } } return null; } }
private boolean shouldBlockClick(MotionEvent event) { if (isContentClickableWhenMenuOpened) { return false; } if (rootView != null && isMenuOpened()) { rootView.getHitRect(tempRect); if (tempRect.contains((int) event.getX(), (int) event.getY())) { return true; } } return false; }
/** * @hide */ @Override public void attachRevealInfo(RevealInfo info) { info.getTarget().getHitRect(mTargetBounds); mRevealInfo = info; }
/** * @hide */ @Override public void attachRevealInfo(RevealInfo info) { info.getTarget().getHitRect(mTargetBounds); mRevealInfo = info; }
@Nullable @Override public Object getElementToHighlightAtPosition(ViewGroup element, int x, int y, Rect bounds) { View hitChild = null; for (int i = element.getChildCount() - 1; i >= 0; --i) { final View childView = element.getChildAt(i); if (isChildVisible(childView) && childView.getVisibility() == View.VISIBLE) { childView.getHitRect(bounds); if (bounds.contains(x, y)) { hitChild = childView; break; } } } if (hitChild != null) { return hitChild; } else { bounds.set(0, 0, element.getWidth(), element.getHeight()); return element; } } }
private boolean isEventOverChild(MotionEvent ev, List<View> children) { final int actionIndex = ev.getActionIndex(); final float x = ev.getX(actionIndex) + getScrollX(); final float y = ev.getY(actionIndex) + getScrollY(); for (View child : children) { if (!canViewReceivePointerEvents(child)) { continue; } child.getHitRect(sHitFrame); // child can receive the motion event. if (sHitFrame.contains((int) x, (int) y)) { return true; } } return false; }
private boolean isPinnedViewTouched(View view, float x, float y) { view.getHitRect(mTouchRect); // by taping top or bottom padding, the list performs on click on a border item. // we don't add top padding here to keep behavior consistent. mTouchRect.top += mTranslateY; mTouchRect.bottom += mTranslateY + getPaddingTop(); mTouchRect.left += getPaddingLeft(); mTouchRect.right -= getPaddingRight(); return mTouchRect.contains((int)x, (int)y); }