/** * Called when the user clicks on a day. Handles callbacks to the * {@link OnDayClickListener} if one is set. * <p/> * If the day is out of the range set by minDate and/or maxDate, this is a no-op. * * @param day The day that was clicked */ private void onDayClick(int day) { // If the min / max date are set, only process the click if it's a valid selection. if (isOutOfRange(mYear, mMonth, day)) { return; } if (mOnDayClickListener != null) { mOnDayClickListener.onDayClick(this, new CalendarDay(mYear, mMonth, day)); } // This is a no-op if accessibility is turned off. mTouchHelper.sendEventForVirtualView(day, AccessibilityEvent.TYPE_VIEW_CLICKED); }
/** * Called when the user clicks on a day. Handles callbacks to the * {@link OnDayClickListener} if one is set. * * @param day The day that was clicked */ private void onDayClick(int day) { if (mOnDayClickListener != null) { mOnDayClickListener.onDayClick(this, new CalendarDay(mYear, mMonth, day)); } // This is a no-op if accessibility is turned off. mTouchHelper.sendEventForVirtualView(day, AccessibilityEvent.TYPE_VIEW_CLICKED); }