Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] StateLayout Crops its content when switching screen from portrait to landscape #1561

@DamienDoumer

Description

@DamienDoumer

Description

When I wrap my UI into a statelayout on iOS, when the page loads first, everything is fine. But when I move the screen from portrait mode to landscape several times, the layout gets cropped.
The content of the statelayout stops filling the screen as it did before.

Steps to Reproduce

  1. Add a statelayout to a grid in a content page
  2. Add views to the statelayout
  3. Move from portrait to landscape several times.
  4. Notice how at some point in time, the layout stops being responsive and crops
  5. This behaviour is more visible in UIs with complex view hirarchy. I made a simple demo that demonstrates this bug
  6. Just launch the demo (iOS), and on the first page, witch from portrait to landscape and notice the issue

Expected Behavior

Moving from portrait to landscape and navigating to and out of the page containing the statelayout on iOS should not make the view crop.

Actual Behavior

The view randomly crops when moving from portrait to landscape and vice versa.

Basic Information

  • Version with issue: 1.2.0
  • Last known good version: Null
  • IDE: VS2019 & Rider
  • Platform Target Frameworks: iOS
    • iOS: 14

Workaround

Instead of using the state layout to switch views based on state, use triggers.

Reproduction imagery

When the app is run the first time in portrait mode, here is what I get:
image

Once I switch from portrait to landscape here is what I get:
image

Sometimes the crop occurs when I switch back to portrait.

Reproduction Link

https://github.com/coolc0ders/XamarinFormsSkeletonLoader

Metadata

Metadata

Assignees

No one assigned

    Labels

    a/StateLayoutbugSomething isn't working. Breaky break.s/unverifiedThis issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions