hugomfandrade / CalendarView-Widget

📅 CalendarView-Widget is an Android library that allows you to customize and display a calendar and an overview of its events
MIT License
27 stars 14 forks source link

Increase the maximum number of CalendarObjects per day in CalendarView #12

Closed emm-an-uel closed 1 year ago

emm-an-uel commented 1 year ago

Hey, I've forked this repo and changed the height of each CalendarObject (as shown in the attached image) but I couldn't find how to modify the maximum number of CalendarObjects per day. As of now, the CalendarView will only show up to 4 CalendarObjects per day, which made sense with the original height of each CalendarObject, but since my CalendarObjects are smaller, I'd like if I could show more of them per day.

Where in the code could I make modifications to achieve this? I'm looking to change it to a maximum of 10 CalendarObjects per day.

Thanks

image

hugomfandrade commented 1 year ago

Hi, again I did not provide this as an option in the form of an attribute. However, you could go to the 'xml_grid_item_day' layout file, and change the attribute 'mtr_number_of_items' to 10 (4 is the default value)

hugomfandrade commented 1 year ago

Then, they are populated in the 'CalendarView' file, between lines 563 and 573

emm-an-uel commented 1 year ago

Cheers, I've managed to change the attribute