Web browsing does not change when keyboard appears

I need to resize my web view that looks like a Cordoba / Phone key when the keyboard appears. Right now, as shown below, my input text fields are overlaid with the device keyboard. I want to compress the height of the web view and set it to a level above the device keyboard.

Operation code:

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg_home"> <include android:id="@+id/head" layout="@layout/header" /> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginBottom="11dp" android:layout_marginLeft="11dp" android:layout_marginRight="11dp" android:layout_marginTop="2dp" android:layout_below="@id/head" android:background="@drawable/overlay_bg2" android:orientation="vertical" android:padding="9dp" > <WebView android:id="@+id/webView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:isScrollContainer="true"/> <ProgressBar android:id="@+id/progressBar" style="?android:attr/progressBarStyleLargeInverse" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:visibility="invisible" /> </FrameLayout> </RelativeLayout> 

Manifest entries:
Theme android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"


android:windowSoftInputMode="adjustResize" keyboard control android:windowSoftInputMode="adjustResize"

+6
source share
1 answer

As far as I know, if your activity (or the application as a whole) is installed in full screen; android: windowSoftInputMode = "adjustResize" will not work.

+2
source

Source: https://habr.com/ru/post/982425/


All Articles