I need to show a CalendarView control in which I can have custom background for each dates and use custom selectors. I could find examples of Material DatePicker, but did not find any CalendarView control which I can customize. Can we customize CalendarView control in Android SDK ?
1 Answer
No, we cannot customize CalendarView widget. We will need to use an external library for that. I could not find a good one in Xamarin.Android where we can have custom drawables as a background. So I bound a Java Library for that.
You can download the binding project from GitHub using this link
After you add a reference to the binding project you can easily integrate the widget as below:
<com.prolificinteractive.materialcalendarview.MaterialCalendarView
android:id="@+id/calendarView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
app:mcv_selectionColor="@color/primary"
app:mcv_arrowColor="@color/primary" />
-
Thanks for the quick reply @Sreeraj :) but unfortunately I cannot use an external library as of now,will try some other work around then.– 404Apr 20, 2016 at 6:28
-
I found this: github.com/msioen/Xamarin.MaterialCalendarView Perhaps it'll be useful for somebody Oct 20, 2017 at 18:19