@Override
    public boolean onTouchEvent(MotionEvent event) {
        if (isEnabled()) {
            switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                    isSelected = true;
                    break;

                case MotionEvent.ACTION_UP:
                case MotionEvent.ACTION_CANCEL:
                    isSelected = false;
                    break;
            }
            invalidate();
        }
        return super.onTouchEvent(event);
    }
@ Override public boolean onTouchEvent ( MotionEvent event ) { if ( isEnabled ( ) ) { switch ( event . getAction ( ) ) { case MotionEvent . ACTION_DOWN : isSelected = true ; break ; case MotionEvent . ACTION_UP : case MotionEvent . ACTION_CANCEL : isSelected = false ; break ; } invalidate ( ) ; } return super . onTouchEvent ( event ) ; }
/*
**********************************************************************************
LISTENER METHODS
**********************************************************************************