Code example for Rect

Methods: contains

    public boolean onInterceptTouchEvent(MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_DOWN) {
            if (mButtonBounds.contains((int)event.getX(), (int)event.getY())) {
                mCapturingEvents = false;
                return false; 
        mCapturingEvents = true;
        return mService.interceptTouchEvent(event)
                ? true : super.onInterceptTouchEvent(event);
    public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
        if (super.onRequestSendAccessibilityEvent(child, event)) {
            // The status bar is very small so augment the view that the user is touching 
            // with the content of the status bar a whole. This way an accessibility service 
Contextual code suggestions in your IDE  Get Codota for Java