Skip to content

[Android] OnSizeAllocated not reported for Android AppShell Flyout content #22045

Open
@InquisitorJax

Description

@InquisitorJax

Description

Correct width and height not being reported for a content view that is placed inside of AppShell FlyoutContent

Steps to Reproduce

  1. Create a new MAUI App
  2. Change FlyoutBehavior to "Flyout"
  3. Add a Custom ContentView and override OnSizeAllocated method
    protected override void OnSizeAllocated(double width, double height)
    {
    base.OnSizeAllocated(width, height);
    // BUG: Actual size never reported :(
    Console.WriteLine($"====> W {width} H {height}");
    }
  4. Add the custom content view as a flyout in appshell
    <Shell.FlyoutContent>
    <local:MainMenuView />
    </Shell.FlyoutContent>

When running the app the method is invoked twice
once with '-1' values and another time with '0' values - never the actual size.

Link to public reproduction project repository

No response

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

API 33 tested

Did you find any workaround?

nope

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyoutpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions