Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CarouselView content calls SizeChanged forever with certain parent view/display resolution combinations #22363

Open
sjordanGSS opened this issue May 13, 2024 · 2 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 t/bug Something isn't working
Milestone

Comments

@sjordanGSS
Copy link

sjordanGSS commented May 13, 2024

Description

With the following View Hierarchy:

  • Border
    • ContentView
      • CarouselView
        • Grid

The Grid will invoke the SizeChanged event forever, with the height fluctuating by ~1 pixel each time.

Check the "Relevant log output" section for the observed log output from the repro.

This appears to be somewhat dependent on the display resolution of the device, as I have only managed to reproduce the issue on devices with resolutions of 1920x1080 and 1080x1920 so far.

The view is still responsive when this happens: this isn't a hang/softlock etc.

Steps to Reproduce

  • Create an emulator with a resolution of 1080x1920, screen size 22", or use a physical device with these screen measurements
  • Run the repro on the emulator
  • Observe the log output

Link to public reproduction project repository

https://github.com/sjordanGSS/carouselview-test

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Reproduced locally on Android 11 and 13

Did you find any workaround?

Removing the ContentView from the hierarchy resolves the issue (interestingly, doing so also reduces the number of times SizeChanged is invoked by the CarouselView from 2 to 1), however this prevents the use of ContentView-derived controls to wrap the CarouselView e.g. Maui.CommunityToolkit's LazyView

Relevant log output

[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2409.3333333333335 height
[DOTNET] Grid size changed to 1434.6666666666667 width and 2410.6666666666665 height
@sjordanGSS sjordanGSS added the t/bug Something isn't working label May 13, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jsuarezruiz jsuarezruiz added area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 labels May 13, 2024
@PureWeen
Copy link
Member

Possibly related #22347

@PureWeen PureWeen added this to the Backlog milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants