dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.6k stars 1.61k forks source link

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

Open InquisitorJax opened 1 week ago

InquisitorJax commented 1 week ago

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

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

ninachen03 commented 1 week ago

Verified this issue with Visual Studio 17.10.0 Preview 5 ( 8.0.7&8.0.21).I can repro this issue. OnSize