Open siem300 opened 7 months ago
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
I have a similar issue, my tabbed page is using a BottomNavBar, and the bar is stretched to fill half the screen when the keyboard opens
The moment you give the tabbar a background color the problem gets worse cause you can't see the underlying content anymore.
Is there any workaround for this issue. It is currently halting our product from being taken into production.
alright so here's a workaround
#if ANDROID
this.Children[0].Loaded += (_,_) =>
{
var platformView = (this.Handler as IPlatformViewHandler).PlatformView;
var bottomNavigationView = (platformView.Parent.Parent as Android.Views.View)
.FindViewById<Android.Views.ViewGroup>(Resource.Id.navigationlayout_bottomtabs)
.GetChildAt(0);
bottomNavigationView.SetPadding(0,0,0,0);
AndroidX.Core.View.ViewCompat.SetOnApplyWindowInsetsListener(bottomNavigationView, null);
};
#endif
Add this to the ctor of your tabbedpage that's being pushed modally.
This seems to be a weird quirk with BottomNavigationView
If you search around for BottomNavigationView
and software keyboard you'll get a bunch of SO posts that tell you to use "AdjustPan" instead of "AdjustResize" to fix :-)
BottomNavigationView has this window inset watcher that bumps the navigationview up. I haven't tested all scenarios to see if this breaks other things yet.
For NET9 I'm hoping that moving to DialogFragment just magically fixes this
Verified this on VS 17.10.0 Preview 2.0(8.0.7). Repro on Android 14.0-API34. Maui-Modal-TabbedPage.zip
@PureWeen The workaround works! Thanks for figuring out a temporary solution.
Description
During our migration of Maui from Xamarin Forms we ran into a problem where the TabbedPage renders its Toolbar across the content of the shown page. This only happens when the TabbedPage is opened as a Modal and SetSoftInputMode is set to AdjustResize in the MainActivity.
We need the AdjustResize to prevent the keyboard from blocking the input control when the user is typing.
I have attached a reproduction project and screenshots containing the error.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/siem300/Maui-Modal-TabbedPage-issue
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
https://github.com/dotnet/maui/issues/20358#issuecomment-1995929663
Relevant log output
No response