caldroid/src/main/java/com/roomorama/caldroid/CaldroidGridAdapter.java
protected void customizeTextView(int position, TextView cellView) {
		cellView.setTextColor(resources.getColor(R.color.caldroid_pokevian_dark_text));

		// Get dateTime of this cell
		DateTime dateTime = this.datetimeList.get(position);

		// Set color of the dates in previous / next month
		if (dateTime.getMonth() != month) {
			cellView.setTextColor(resources
					.getColor(R.color.caldroid_darker_gray));
		}

		boolean shouldResetDiabledView = false;
		boolean shouldResetSelectedView = false;

		// Customize for disabled dates and date outside min/max dates
		if ((minDateTime != null && dateTime.lt(minDateTime))
				|| (maxDateTime != null && dateTime.gt(maxDateTime))
				|| (disableDates != null && disableDatesMap
						.containsKey(dateTime))) {

			cellView.setTextColor(CaldroidFragment.disabledTextColor);
			if (CaldroidFragment.disabledBackgroundDrawable == -1) {
				cellView.setBackgroundResource(R.drawable.disable_cell);
			} else {
				cellView.setBackgroundResource(CaldroidFragment.disabledBackgroundDrawable);
			}

			if (dateTime.equals(getToday())) {
				cellView.setBackgroundResource(R.drawable.red_border_gray_bg);
			}
		} else {
			shouldResetDiabledView = true;
		}

		// Customize for selected dates
		if (selectedDates != null && selectedDatesMap.containsKey(dateTime)) {
			if (CaldroidFragment.selectedBackgroundDrawable != -1) {
				cellView.setBackgroundResource(CaldroidFragment.selectedBackgroundDrawable);
			} else {
				cellView.setBackgroundColor(resources
						.getColor(R.color.caldroid_pokevian_selected_cell));
			}

			cellView.setTextColor(CaldroidFragment.selectedTextColor);
		} else {
			shouldResetSelectedView = true;
		}

		if (shouldResetDiabledView && shouldResetSelectedView) {
			// Customize for today
			if (dateTime.equals(getToday())) {
				cellView.setBackgroundResource(R.drawable.red_border);
			} else {
				cellView.setBackgroundResource(R.drawable.cell_bg);
			}
		}

		//cellView.setText("" + dateTime.getDay());
		cellView.setText(String.valueOf(dateTime.getDay()));

		// Set custom color if required
		setCustomResources(dateTime, cellView, cellView);
	}
/**
	 * Customize colors of text and background based on states of the cell
	 * (disabled, active, selected, etc)
	 * 
	 * To be used only in getView method
	 * 
	 * @param position
	 * @param cellView
	 */
Customize colors of text and background based on states of the cell
(disabled, active, selected, etc)

To be used only in getView method

@param position
@param cellView
Customize colors of text and background based on states of the cell ( disabled active selected etc ) To be used only in getView method @param position @param cellView
protected void customizeTextView(int position, TextView cellView) {
		cellView.setTextColor(resources.getColor(R.color.caldroid_pokevian_dark_text));
		DateTime dateTime = this.datetimeList.get(position);
		if (dateTime.getMonth() != month) {
			cellView.setTextColor(resources
					.getColor(R.color.caldroid_darker_gray));
		}
		boolean shouldResetDiabledView = false;
		boolean shouldResetSelectedView = false;
		if ((minDateTime != null && dateTime.lt(minDateTime))
				|| (maxDateTime != null && dateTime.gt(maxDateTime))
				|| (disableDates != null && disableDatesMap
						.containsKey(dateTime))) {
			cellView.setTextColor(CaldroidFragment.disabledTextColor);
			if (CaldroidFragment.disabledBackgroundDrawable == -1) {
				cellView.setBackgroundResource(R.drawable.disable_cell);
			} else {
				cellView.setBackgroundResource(CaldroidFragment.disabledBackgroundDrawable);
			}
			if (dateTime.equals(getToday())) {
				cellView.setBackgroundResource(R.drawable.red_border_gray_bg);
			}
		} else {
			shouldResetDiabledView = true;
		}
		if (selectedDates != null && selectedDatesMap.containsKey(dateTime)) {
			if (CaldroidFragment.selectedBackgroundDrawable != -1) {
				cellView.setBackgroundResource(CaldroidFragment.selectedBackgroundDrawable);
			} else {
				cellView.setBackgroundColor(resources
						.getColor(R.color.caldroid_pokevian_selected_cell));
			}
			cellView.setTextColor(CaldroidFragment.selectedTextColor);
		} else {
			shouldResetSelectedView = true;
		}
		if (shouldResetDiabledView && shouldResetSelectedView) {
			if (dateTime.equals(getToday())) {
				cellView.setBackgroundResource(R.drawable.red_border);
			} else {
				cellView.setBackgroundResource(R.drawable.cell_bg);
			}
		}
		cellView.setText(String.valueOf(dateTime.getDay()));
		setCustomResources(dateTime, cellView, cellView);
	}
protected void customizeTextView ( int position , TextView cellView ) { cellView . setTextColor ( resources . getColor ( R . color . caldroid_pokevian_dark_text ) ) ; DateTime dateTime = this . datetimeList . get ( position ) ; if ( dateTime . getMonth ( ) != month ) { cellView . setTextColor ( resources . getColor ( R . color . caldroid_darker_gray ) ) ; } boolean shouldResetDiabledView = false ; boolean shouldResetSelectedView = false ; if ( ( minDateTime != null && dateTime . lt ( minDateTime ) ) || ( maxDateTime != null && dateTime . gt ( maxDateTime ) ) || ( disableDates != null && disableDatesMap . containsKey ( dateTime ) ) ) { cellView . setTextColor ( CaldroidFragment . disabledTextColor ) ; if ( CaldroidFragment . disabledBackgroundDrawable == - 1 ) { cellView . setBackgroundResource ( R . drawable . disable_cell ) ; } else { cellView . setBackgroundResource ( CaldroidFragment . disabledBackgroundDrawable ) ; } if ( dateTime . equals ( getToday ( ) ) ) { cellView . setBackgroundResource ( R . drawable . red_border_gray_bg ) ; } } else { shouldResetDiabledView = true ; } if ( selectedDates != null && selectedDatesMap . containsKey ( dateTime ) ) { if ( CaldroidFragment . selectedBackgroundDrawable != - 1 ) { cellView . setBackgroundResource ( CaldroidFragment . selectedBackgroundDrawable ) ; } else { cellView . setBackgroundColor ( resources . getColor ( R . color . caldroid_pokevian_selected_cell ) ) ; } cellView . setTextColor ( CaldroidFragment . selectedTextColor ) ; } else { shouldResetSelectedView = true ; } if ( shouldResetDiabledView && shouldResetSelectedView ) { if ( dateTime . equals ( getToday ( ) ) ) { cellView . setBackgroundResource ( R . drawable . red_border ) ; } else { cellView . setBackgroundResource ( R . drawable . cell_bg ) ; } } cellView . setText ( String . valueOf ( dateTime . getDay ( ) ) ) ; setCustomResources ( dateTime , cellView , cellView ) ; }
Customize colors of text and background based on states of the cell
 (disabled, active, selected, etc)
Customize colors of text and background based on states of the cell ( disabled active selected etc )
// Get dateTime of this cell // Set color of the dates in previous / next month // Customize for disabled dates and date outside min/max dates // Customize for selected dates // Customize for today //cellView.setText("" + dateTime.getDay()); // Set custom color if required