代码之家  ›  专栏  ›  技术社区  ›  Narendra

键盘消失后Android Webview中不需要的顶部和底部空白

  •  0
  • Narendra  · 技术社区  · 7 年前

    remove-unwanted-white-space-in-webview-android android-webview-has-extra-white-space-at-the-bottom

    我正在使用 NativeScript 用于移动应用程序开发。我有一个在webview中呈现的登录页面,一旦应用程序拥有令牌,应用程序就会重定向到其他本机组件。

    Back 按钮隐藏键盘,显示页面顶部和底部的空白。

    根据以上线程的建议,我尝试将填充和边缘设置为0。

    <meta name="viewport" content="target-densityDpi=device-dpi, width=device-width, height=device-height, initial-scale=1">
    
    1 回复  |  直到 7 年前
        1
  •  0
  •   Narendra    7 年前

    谢谢你的操场。 看起来html页面中有百分比的高度和宽度,每次用户从html页面移出时,它都会根据可用空间重新调整自己,有时还会压缩空间。

    100% 为了解决我的问题。