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
22.16k stars 1.74k forks source link

[Android] FlyoutWidth with OnIdiom shows no flyout #13243

Open FroggieFrog opened 1 year ago

FroggieFrog commented 1 year ago

Description

Trying to adjust the FlyoutWidth when running on Windows/Desktop in combination with the OnIdiom markup extension is resulting in no Flyout on Android.

Steps to Reproduce

  1. Create MAUI app
  2. adjust AppShell.xaml
  3. run on Windows -> flyout is shown in desired size
  4. run on Android emulator -> flyout is not shown

adjusted code:

<?xml version="1.0" encoding="UTF-8" ?>
<Shell x:Class="MauiApp3.AppShell"
       xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
       xmlns:local="clr-namespace:MauiApp3"
+       Shell.FlyoutBehavior="Flyout"
+       FlyoutWidth="{OnIdiom Desktop=150}">
+    <!--
+    FlyoutWidth="{OnPlatform WinUI=150}" = works on Android emulator
+    FlyoutWidth="{OnIdiom Desktop=150}"  = does not work on Android emulator / no flyout shown
+    -->

    <ShellContent Title="Home"
                  ContentTemplate="{DataTemplate local:MainPage}"
                  Route="MainPage" />

</Shell>

Link to public reproduction project repository

https://github.com/FroggieFrog/bug-maui-flyout-width-onidiom

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

tested with Andorid 11 and 13

Did you find any workaround?

use OnPlatform instead of OnIdiom

Relevant log output

No response

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

homeyf commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Can repro on Android platform with sample project. https://github.com/FroggieFrog/bug-maui-flyout-width-onidiom image