-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Modal shown TabbedPage has problems with SetSoftInputMode AdjustResize #20358
Comments
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 has this window inset watcher that bumps the navigationview up. 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. |
@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?
#20358 (comment)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: