Applandeo / Material-Calendar-View

Material Calendar View for Android
Apache License 2.0
975 stars 316 forks source link

How to extend EventDay #441

Open mgodbole opened 1 year ago

mgodbole commented 1 year ago

I am working on a calendar app (Android) which displays historic events (This day, that year kind) and the Material-Calendar-View is perfect for me as it allows me to mark dates as well as provide different icons based on the event type.

I would like to build a feature where the user clicks on a date in CalendarView and a popup displays information on what happened that day. As per the API, EventDay is the class to incorporate this information.

Sadly, when I try to extend EventDay, I get an error saying the class is final.

Any workarounds/alternatives for this? I am using version 1.9.0-rc03 which is the only version available in Maven Central https://mvnrepository.com/artifact/com.applandeo/material-calendar-view

Thank you. Maneesh

mgodbole commented 1 year ago

Found a possible workaround. EventDay needs a Calendar object. So I extended GregorianCalendar which will accept the custom content and passed it to EventDay.