0

I'm developing a .NET MAUI app with a WebView that displays my web app. On Android, when the soft keyboard opens, it overlaps input fields instead of panning the content upward (while it does it fine on the Chrome mobile browser).

I’ve tried setting android:Application.WindowSoftInputModeAdjust="Pan" in the App.xaml file, but it doesn’t seem to have any effect on the WebView. On the other hand, using WindowSoftInputModeAdjust="Resize" works, but I specifically want the panning behavior.

How can I achieve "pan" behavior for the soft keyboard in my MAUI app's WebView on Android?

App.Xaml:

<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:MyApp.Mobile"
             xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls"
             android:Application.WindowSoftInputModeAdjust="Pan"
             x:Class="MyApp.Mobile.App">
    <Application.Resources>

    </Application.Resources>
</Application>

Any guidance would be appreciated!

4
  • With Resize your problem is solved which you have with Pan, but you want Pan. Sounds strange Commented Nov 29, 2024 at 4:59
  • @SirRufo resize is just terrible aesthetically. Commented Nov 29, 2024 at 6:42
  • @H.A.H. pan may have a terrible user experience (if menu, back or ok button at the top are out of sight) Commented Nov 29, 2024 at 8:05
  • I tested with the webview on the android, but the softkeyboard will not overlap input. Commented Jan 1 at 9:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.