I'm creating an hybrid application with WebView system and I have an issue with Android : when I tap on an input, the keyboard shows up, I write what I want and when the keyboard disappear, he leaves a white background that makes its size.
Here is a screeshot of the problem. First screen is when the keyboard is open and the second one is when the keyboard is closed.
I did a lot of research and still haven't found a good solution... I already haved seen this topic but it doesn't work for me.
Here is my MainActivity :
[Activity(
Icon = "@drawable/icon",
Theme = "@style/MyTheme",
LaunchMode = Android.Content.PM.LaunchMode.SingleTop,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
WindowSoftInputMode = SoftInput.AdjustPan,
HardwareAccelerated = true
)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
And here my androidManifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="fr.beautiful.app"
android:installLocation="auto" android:versionName="1.0" android:versionCode="1"
android:windowSoftInputMode="adjustPan">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="fr.edition.ftel.cosoft.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:label="BeautifulApp" android:icon="@drawable/icon">
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
</application>
</manifest>
I’ve tried almost every windowSoftInputMode but none seem to work. Finally, the bug does not occur on all devices but only the most recent
Do you have any idea to help me ? Thanks in advance.