From 9ca92f4c21a663050a375d186c87666c8cf10730 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Wed, 22 Apr 2020 11:29:19 -0700 Subject: [PATCH] Resize webview when keyboard is shown When the adjust mode is unspecified, Android will not resize the webview when showing the on screen keyboard to keep the input element on screen. Explicitly instruct it to use `adjustResize` mode. Possibly this is because the webview bootstrap uses an `AbsoluteLayout` as the top level widget. See https://developer.android.com/guide/topics/manifest/activity-element#wsoft for details. --- .../bootstraps/webview/build/templates/AndroidManifest.tmpl.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pythonforandroid/bootstraps/webview/build/templates/AndroidManifest.tmpl.xml b/pythonforandroid/bootstraps/webview/build/templates/AndroidManifest.tmpl.xml index e99c66d439..f77533b1e6 100644 --- a/pythonforandroid/bootstraps/webview/build/templates/AndroidManifest.tmpl.xml +++ b/pythonforandroid/bootstraps/webview/build/templates/AndroidManifest.tmpl.xml @@ -70,6 +70,7 @@ {% if args.activity_launch_mode %} android:launchMode="{{ args.activity_launch_mode }}" {% endif %} + android:windowSoftInputMode="adjustResize" >