Skip to content

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

Closed

Description

@sjordanGSS

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

Activity

  1. added
    t/bug
    on May 13, 2024
  2. github-actions commented on May 13, 2024

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

  3. added
    area-controls-collectionview
    on May 13, 2024
  4. PureWeen commented on May 13, 2024

    @PureWeen
    Member

    Possibly related #22347

  5. added this to the Backlog milestone on May 13, 2024
  6. locked and limited conversation to collaborators on Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewplatform/androidt/bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions