今天有一个问题一直困扰着我。


内嵌一个webview 然后在输入框调出 android 软键盘时 一直 被覆盖。

各种调整参数设置了没用。。。


1、有把android:windowSoftInputMode="stateHidden|adjustResize“

2、在webview 外嵌套 一个scroll

3、在webview外嵌套 Linearlayout

种种办法都尝试过,但是效果不大。



后来在博客上看到一篇文章:引用官方文档


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.

意思是说


全屏的窗口下面 会忽略 SOFT_INPUT_ADJUST_RESIZE  ,不会进行调整。。

回想之下 ,我的webview 所在的activity 就是设置的全屏。。。


断然去掉 全屏设置,结果一切正常!







更多相关文章

  1. Android(安卓)设置状态栏及Activity横屏或竖屏。
  2. Android(安卓)getDimensionPixelSize, 代码中设置字体大小,读xml
  3. Android:TextView属性大全
  4. 关于EditText
  5. Android中ExpandableListView的使用(一)
  6. android设置软键盘搜索键以及监听搜索键点击事件
  7. android TextView属性
  8. Android学习之BottomNavigationBar实现Android特色底部导航栏
  9. 关于基本控件TextView属性大全详解

随机推荐

  1. Android4开发入门经典 之 第一部分:Androi
  2. 将androd项目作为moudle引入配置信息
  3. Android(安卓)UI开发专题(四) View自绘控
  4. Android模拟器介绍及操作
  5. cocos2dx在Android下如何接入91SDK
  6. Android(安卓)studio制作计算器源代码
  7. Android(安卓)通过WebView和js的交互
  8. Android上传图片到七牛云看这篇就够了
  9. Android屏幕密度(Density)和分辨率的关系
  10. Android创建和使用数据库详细指南