Open eyeveye opened 1 year ago
Hi eyeveye, please use the issue template as it provides useful information about how the bug may be caused.
Unfortunately I do not own an IOS device and cannot find or test for issues on IOS devices. I can only rely that Xamarin or MAUI works properly cross platform.
The CalendarView
is just a CollectionView
. I have mentioned that CollectionView
performance is extremely slow in MAUI and so far with everything I have done to try to make it faster there has been nothing that has worked to fix this. For example using a Grid
instead of a CollectionView
or using an actual CollectionView
and just rendering Labels
.
For your issue, the only thing I can do is give suggestions: Luckily I have seen this layout issue before in earlier versions of MAUI on Android and know that it is either caused by the Border
of the item not clipping the content to its shape, or that the CollectionView
doesn't have enough space to render all its items, so they are just being cut off to a size evenly divided between the items:
For the first potential cause, try finding another way to clip the content to a circular shape.
For the second potential cause, try implementing the DaysView container yourself, or completely implementing a CollectionView
with a Calendar
's Days
property manually and giving it more horizontal or vertical space, try changing the CollectionView
's ItemsLayout
property to a GridItemsLayout
with an increased vertical and horizontal spacing, or try making the DayTemplate
smaller.
You can modify the look of the container of days by setting the CalendarView
's DaysViewTemplate
property.
You can modify the look of a Day by setting the CalendarView
's DayTemplate
property.
Default functionality can be achieved easier by using a DayView
.
@ME-MarvinE - could you complete your sentence above please, the one that ends the 4th para : "Try setting the"...
The suspense is killing me and I'm seeing the same issue on iOS. :)
@brettnagy Done:
For your issue, the only thing I can do is give suggestions: Luckily I have seen this layout issue before in earlier versions of MAUI on Android and know that it is either caused by the
Border
of the item not clipping the content to its shape, or that theCollectionView
doesn't have enough space to render all its items, so they are just being cut off to a size evenly divided between the items:
For the first potential cause, try finding another way to clip the content to a circular shape.
For the second potential cause, try implementing the DaysView container yourself, or completely implementing a
CollectionView
with aCalendar
'sDays
property manually and giving it more horizontal or vertical space, try changing theCollectionView
'sItemsLayout
property to aGridItemsLayout
with an increased vertical and horizontal spacing, or try making theDayTemplate
smaller.
Any ideas on when we might see performance improvement is it solely relying on CollectionView getting fixed? Do we know if they have this on the roadmap?
@pblake81239 Relying on CollectionView being fixed. I haven't found any alternatives on GitHub and I am less motivated to learning platform specific APIs than I am/was when learning Forms and Maui to create the plugin so the extent of doing this would be limited to "if I feel like it" and of course suggestions/contributors. Even then, I won't be able to do anything for IOS as I don't have an IOS device, nor do I plan on getting one.
FWIW: the performance in release mode is very different to debug mode. I have Android and iOS Maui apps in the app stores, one using this control, and performance is pretty good.
@brettnagy Interesting, is one of your apps on both platforms or only on one, if on both, do you notice any performance differences? If on one, which platform?
Also, do you use all 5/6 rows of the Calendar?
Actually on Android Release mode performance is pretty good. I will check IOS this week. I hadnt used it in release mode thanks for that!
I do have the same app on both Android and iOS, but it’s hard for me to fairly compare Android and iOS as my hardware is so different: middle of the road Samsung v. iPhone 14 Max. The Samsung performs as well my iPhone, so maybe that gives Android the edge.
@eyeveye Do you have any updates on this? Are you still experiencing this? Could you try to run it in release mode too, to see if performance improves as @pblake81239 mentioned?
Performance issue may be related to dotnet/maui#21460
The image below show the exact problem.
The other issue is the slow performance on the calendar. It took quite a while to display out the calendar.