Code example for MotionEvent

Methods: getAction

0
        @Override 
        public boolean dispatchTouchEvent(MotionEvent ev) {
            if(!mTouchInTitleBar) {
                return false; 
            } else { 
                switch(ev.getAction() & MotionEvent.ACTION_MASK) {
                    case MotionEvent.ACTION_UP:
                    case MotionEvent.ACTION_CANCEL:
                        mTouchInTitleBar = false;
                        break; 
 
                    default: 
 
                } 
 
                return super.dispatchTouchEvent(ev);
            } 
        } 
    } 
 
    private static final String TAG = "TitleBarWebView";