I am developing a native Android app that is a wrapper for a webpage. It works pretty well, but there is an issue where the soft keyboard (Android keyboard) appears over the bottom of the webview, which makes it impossible to see what you are writing if you are trying to fill out something near the bottom of the webview.
Please see image below. Here I've clicked a textarea that is impossible to reach while the keyboard is open:
The code for this view is:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp" tools:context=".PetpulseMainActivity">
<WebView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/petpulseWebView" />
</RelativeLayout>
I've tried switching the RelativeLayout
with ScrollView
and other approaches I've found, but for some reason the keyboard is always rendered on top of the view.
AndroidManifest.xml:
<activity
android:name=".PetpulseMainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
[...]
</activity>