Lines Matching refs:day

51  * A calendar-like view displaying a specified month and the appropriate selectable day numbers
77 /** Single-letter (when available) formatter for the day of week label. */
105 // Which day is selected [0-6] or -1 if no day is selected
108 // Which day is today [0-6] or -1 if no day is today
111 // Which day of the week to start on [0-6]
122 // First enabled day
125 // Last enabled day
135 // Optional listener for handling day click actions
240 final int day = getDayFromLocation(event.getX(), event.getY());
241 if (day >= 0) {
242 onDayClick(day);
302 private static boolean isValidDayOfWeek(int day) {
303 return day >= Calendar.SUNDAY && day <= Calendar.SATURDAY;
316 * @param selectedDay the selected day of the month, or -1 for no selection.
319 * @param weekStart which day the week should start on. {@link Calendar#SUNDAY} through
321 * @param enabledDayStart the first enabled day.
322 * @param enabledDayEnd the last enabled day.
337 // Figure out what day today is
363 final int day = i + 1;
364 if (sameDay(day, today)) {
366 mToday = day;
409 private boolean sameDay(int day, Time today) {
412 day == today.monthDay;
466 for (int day = 1; day <= mNumCells; day++) {
468 if (mSelectedDay == day) {
473 if (mHasToday && mToday == day) {
478 final Paint paint = (day < mEnabledDayStart || day > mEnabledDayEnd) ?
480 canvas.drawText(String.format("%d", day), x, y, paint);
495 * Calculates the day that the given x position is in, accounting for week
496 * number. Returns the day or -1 if the position wasn't in a day.
499 * @return The day number, or -1 if the position wasn't in a day
506 // Selection is (x - start) / (pixels/day) == (x -s) * day / pixels
510 int day = column - findDayOffset() + 1;
511 day += row * mNumDays;
512 if (day < 1 || day > mNumCells) {
515 return day;
519 * Called when the user clicks on a day. Handles callbacks to the
522 * @param day The day that was clicked
524 private void onDayClick(int day) {
527 date.set(mYear, mMonth, day);
532 mTouchHelper.sendEventForVirtualView(day, AccessibilityEvent.TYPE_VIEW_CLICKED);
540 final int day = mTouchHelper.getFocusedVirtualView();
542 if (day >= 0) {
544 date.set(mYear, mMonth, day);
560 * @param day The date which should receive focus
564 boolean restoreAccessibilityFocus(Calendar day) {
565 if ((day.get(Calendar.YEAR) != mYear) || (day.get(Calendar.MONTH) != mMonth) ||
566 (day.get(Calendar.DAY_OF_MONTH) > mNumCells)) {
569 mTouchHelper.setFocusedVirtualView(day.get(Calendar.DAY_OF_MONTH));
604 final int day = getDayFromLocation(x, y);
605 if (day >= 0) {
606 return day;
613 for (int day = 1; day <= mNumCells; day++) {
614 virtualViewIds.add(day);
652 * @param day The day to calculate bounds for
655 private void getItemBounds(int day, Rect rect) {
660 final int index = ((day - 1) + findDayOffset());
674 * @param day The day to generate a description for
677 private CharSequence getItemDescription(int day) {
678 mTempCalendar.set(mYear, mMonth, day);
682 if (day == mSelectedDay) {
694 public void onDayClick(SimpleMonthView view, Calendar day);