MauiTubePlayer
MauiTubePlayer copied to clipboard
[Android] Collection view not working correctly
Cloned repo and ran on an android emulator :
10 videos are retrieved but only 2 are shown in the collection view.
Any ideas?
Not sure what the issue is. I tried on Android myself on VS4Mac and it works fine. I can see all 10 cells and videos. I am using MAUI version 6.0.424. Which SDK version you are using? Maybe it is a VS for Windows bug. A lot of other people have complained as well. I do not have Windows machine to check; maybe someone can debug on Windows and provide a solution.
Meanwhile, here is how it looks on Android via VS4Mac.
@MentYy you have to share the error logs. Most likely its an issue with the size of the thumbnail image being too big. It's a common android issue, but it could be anything. Could you check your Application Output?
I'm using version 6.0.486. I also seem to experience a bug where it builds and runs fine the 1st time on both a physical device and android emulators but any time after it just crashes. I haven't been able to identify the issue or problem area with the limited testing I've been able to do. Clearing app cache or data doesn't help.
@saamerm I thought so too. I set the size of the thumbnail image to a fixed smaller size which results in a smaller cell but the same issue with only 2 cells visible and the massive space in between. I'll have to check the output when I can test again.
I suspect @saamerm is correct with regards to sizing being an issue.
I removed - HeightRequest="{Binding ItemsHeight, Source={x:Reference RootPage}}" from the video cell control and got result :
This also fixed the crashing - somehow ItemsHeight is causing the crashes as well as the unexpected appearance.
Strange. Is this only happening on VS4Win for Android? On Mac, there is no problem. And I have been using this approach for years in xamarin as well. Never faced this issue.
Dear @MentYy,
I removed - HeightRequest="{Binding ItemsHeight, Source={x:Reference RootPage}}" from the video cell control and set Image HeightRequest set 260.
got result :
Yes, but this is not the behavior I wanted. Hence I put in dynamically computing the Row Height.
And as I said, this seems to be happening on VS4Win for Android only. On Mac, there is no problem for both iOS and Android. I have been using this approach for years in xamarin forms without any issues. So must be a Maui bug on VS4Win only.
Hi, this is a great course and great video 👍 it is actually same behavior on both MAC and PC , I haven't completed the courses yet though maybe later on there is a fix for it once i complete the videos
@amasoumi @MentYy What did you get?
@amasoumi @MentYy What did you get? Last time I tried still the same behaviour, maybe it will be fixed in .net 8
Not fixed on .NET 8. Everything the same