Created
November 18, 2016 21:59
-
-
Save cutiko/eb1a974ebf7761068ab982b7bbfeb7a5 to your computer and use it in GitHub Desktop.
CompactCalendarView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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