Code example for View.OnTouchListener

Methods: onTouch

0
        } 
 
        @Override 
        public boolean dispatchTouchEvent(MotionEvent ev) {
            if (mTouchInterceptor != null && mTouchInterceptor.onTouch(this, ev)) {
                return true; 
            } 
            return super.dispatchTouchEvent(ev);
        } 
 
        @Override 
        protected int[] onCreateDrawableState(int extraSpace) {
            if (mAboveAnchor) {
                final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
                View.mergeDrawableStates(drawableState, ABOVE_ANCHOR_STATE_SET);
                return drawableState;
            } else { 
                return super.onCreateDrawableState(extraSpace);
            } 
        }