microspaze / RGPopup.Maui

Popup controls for .NET MAUI migrated from Rg.Plugins.Popup for Xamarin with some fixes.
MIT License
35 stars 7 forks source link

Popup renders behind the Android navigationbar #11

Open jaison-t-john opened 4 months ago

jaison-t-john commented 4 months ago

@microspaze I have customised the sample project available to make the popup page have verticaloptions as End. This makes the page render behind the device navigation menu bar in Android image

microspaze commented 4 months ago

You can try to hide the system bottom navigation bar when page poped-up.

            _loginPopup = new LoginPopupPage();
            _loginPopup.Loaded += (sender, args) =>
            {
                #if ANDROID
                //Hide bottom navigation bar when page poped-up 
                if (sender is PopupPage { Handler.PlatformView: Android.Views.View { Parent: Android.Widget.FrameLayout decorView } })
                {
                    var uiFlags = Android.Views.SystemUiFlags.LayoutStable | Android.Views.SystemUiFlags.HideNavigation;
                    decorView.SystemUiVisibility = (Android.Views.StatusBarVisibility) uiFlags;
                }
                #endif
            };

I have add the demo code to the sample project by commit: https://github.com/microspaze/RGPopup.Maui/commit/701132a75a7c192c293203f58e192b5c9741ac0a

microspaze commented 4 months ago

https://github.com/microspaze/RGPopup.Maui/assets/17372096/c23c3ccc-5ff3-4bc8-ada1-ef9f4f2e69f0

jaison-t-john commented 4 months ago

@microspaze Thanks for the quick turnaround. But I have a usecase of having multiple popups in my app, So it wont be a good idea to hide the system nav bar multiple times. Can we have something like using safe area for ios..

microspaze commented 3 months ago

@jaison-t-john You can try the latest version 1.0.9. It includes some fix about this issue.