MauiTubePlayer icon indicating copy to clipboard operation
MauiTubePlayer copied to clipboard

[Android] Collection view not working correctly

Open MentYy opened this issue 2 years ago • 12 comments

Cloned repo and ran on an android emulator :

Screenshot_1663687753 Screenshot_1663687761

10 videos are retrieved but only 2 are shown in the collection view.

Any ideas?

MentYy avatar Sep 20 '22 15:09 MentYy

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.

image

naweed avatar Sep 21 '22 03:09 naweed

@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?

saamerm avatar Sep 21 '22 03:09 saamerm

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.

MentYy avatar Sep 21 '22 09:09 MentYy

@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.

MentYy avatar Sep 21 '22 09:09 MentYy

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 : image

This also fixed the crashing - somehow ItemsHeight is causing the crashes as well as the unexpected appearance.

MentYy avatar Sep 21 '22 12:09 MentYy

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.

naweed avatar Sep 21 '22 12:09 naweed

Dear @MentYy,

I removed - HeightRequest="{Binding ItemsHeight, Source={x:Reference RootPage}}" from the video cell control and set Image HeightRequest set 260. image got result : Screenshot_2022-10-09-19-12-19-886_com chirag tubeplayer 1

chirag220792 avatar Oct 09 '22 13:10 chirag220792

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.

naweed avatar Oct 09 '22 21:10 naweed

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 avatar Feb 08 '23 20:02 amasoumi

@amasoumi @MentYy What did you get?

tanakamawere avatar Sep 21 '23 08:09 tanakamawere

@amasoumi @MentYy What did you get? Last time I tried still the same behaviour, maybe it will be fixed in .net 8

amasoumi avatar Sep 21 '23 12:09 amasoumi

Not fixed on .NET 8. Everything the same

EugeneZhenya avatar May 06 '24 16:05 EugeneZhenya