Adding Decorations Using MaterialCalendarView Binding Library In Xamarin.Android
I'm using the MaterialCalendarView library in my Xamarin.Android application, which works well for the most part except that I am unable add a span decoration to the calendar. Doc
Solution 1:
I am unable add a span decoration to the calendar.
The problem is that your ShouldDecorate
always return false when you use dates.Contains(day)
or dates.Exists(e => (e == day))
.
It will compare HashCode
firet so it will always return false, modify your code like below can solve this problem :
if (dates[0].ToString() == day.ToString() || dates[1].ToString() == day.ToString() || dates[2].ToString() == day.ToString() || dates[3].ToString() == day.ToString())
{
return true;
}
else
{
return false;
}
Effect like this :
Post a Comment for "Adding Decorations Using MaterialCalendarView Binding Library In Xamarin.Android"