Create a gist now

Instantly share code, notes, and snippets.

CompactCalendarView
//This lines should help you
@Override
public void onDayClick(Date dateClicked) {
if (today == dateClicked) {
compactCalendarView.setCurrentDayBackgroundColor(ContextCompat.getColor(getContext(), R.color.colorAccent));
} else {
compactCalendarView.setCurrentDayBackgroundColor(ContextCompat.getColor(getContext(), R.color.colorGray));
}
}
@Override
public void onMonthScroll(Date firstDayOfNewMonth) {
//Set the date to a sort of title textview above the view
DateTime month = new DateTime(firstDayOfNewMonth);
monthTv.setText(month.toString("MMMM").toUpperCase());
compactCalendarView.setCurrentDayBackgroundColor(ContextCompat.getColor(getContext(), R.color.colorGray));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment