android– 软键盘隐藏了全屏webview的部分内容

android– 软键盘隐藏了全屏webview的部分内容,第1张

概述我正在开发一个原生Android应用程序,它是网页的包装器.它工作得很好,但是有一个问题,软键盘(Android键盘)出现在webview的底部,这使得如果你试图填写webview底部附近的内容,就无法看到你在写什么.请看下面的图片.在这里,我点击了键盘打开时无法触及的textarea:此视图的代码是:<Re

我正在开发一个原生Android应用程序,它是网页的包装器.它工作得很好,但是有一个问题,软键盘(AndroID键盘)出现在webvIEw的底部,这使得如果你试图填写webvIEw底部附近的内容,就无法看到你在写什么.

请看下面的图片.在这里,我点击了键盘打开时无法触及的textarea:

此视图的代码是:

<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>

我已经尝试使用ScrollVIEw和我发现的其他方法切换relativeLayout,但由于某种原因,键盘始终呈现在视图之上.

AndroIDManifest.xml中:

<activity    androID:name=".PetpulseMainActivity"    androID:label="@string/app_name"    androID:screenorIEntation="portrait">         [...]</activity>

解决方法:

这是一个已知的错误:

https://code.google.com/p/android/issues/detail?id=5497

要避免它,请删除活动的FullScreen主题

更新:

从FLAG_FULLSCREEN开始

Window flag: hIDe all screen decorations (such as the status bar)
while this window is displayed. This allows the window to use the
entire display space for itself — the status bar will be hIDden when
an app window with this flag set is on the top layer. A fullscreen
window will ignore a value of SOFT_input_ADJUST_RESIZE for the
window’s softinputMode fIEld; the window will stay fullscreen and will
not resize.

总结

以上是内存溢出为你收集整理的android – 软键盘隐藏了全屏webview的部分内容全部内容,希望文章能够帮你解决android – 软键盘隐藏了全屏webview的部分内容所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1107739.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存