I am converting an app from Xamarin.Forms and have run into a keyboard display issue. This would be a MAUI bug, since it doesn't happen in Xamarin.Forms. What I am doing:
Setting app to be full screen. Here is the code for MainActivity.cs to do that (and yes I know Maui flags what I am doing as deprecated, but it works anyway.):
public override void OnWindowFocusChanged(bool hasFocus) { base.OnWindowFocusChanged(hasFocus); if (hasFocus) { var uiOptions = SystemUiFlags.HideNavigation | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen | SystemUiFlags.Fullscreen | SystemUiFlags.LayoutStable | SystemUiFlags.ImmersiveSticky; Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions; } }Adding an entry control to a page.
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="App.Views.RootPage"> <ScrollView> <Entry Placeholder="Enter text here..." Text="{Binding userEntry, Mode=TwoWay}" /> </ScrollView> </ContentPage>
When user taps on entry, keyboard displays, but there is a black bar at the bottom of the screen where the 3 Android buttons usually display, under the keyboard. Since the app is full screen, the keyboard should be displayed at the bottom of the screen and there should not be any black bar or Android navigation buttons or room for their display.
How do I reposition the keyboard to display at the bottom of the screen?