简体   繁体   English

当出现软键盘时,如何保持Android Webview中的固定页脚不覆盖输入字段?

[英]How to keep fixed footer in Android webview from covering input field when soft keyboard comes up?

I have a webview that is a react app (not react native). 我有一个webview是一个react应用程序(不是本地本机)。 It is a login page with two input fields and a fixed footer. 这是一个登录页面,具有两个输入字段和一个固定的页脚。

When the input is focused the footer comes up and overlaps the input field hiding the password input field. 当输入被聚焦时,页脚出现并与输入字段重叠,从而隐藏了密码输入字段。

What can I do so the footer stays under the keyboard? 我该怎么做才能使页脚停留在键盘下?

在此处输入图片说明

getActivity().getWindow().setSoftInputMode(
                WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

set this onCreate method of your activity 设置您的活动的onCreate方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM