【问题标题】:Android 4.3 Webview not scrolling when soft keypad is displayed for form fields为表单字段显示软键盘时,Android 4.3 Webview 不滚动
【发布时间】:2013-07-31 08:09:19
【问题描述】:

我有一个显示表单的普通 Webview。表单有很多字段,所以如果我关注屏幕下部的字段,webview 不会滚动,并且软键盘会隐藏输入字段。 我只在 4.3 版遇到过这个问题(我正在 Nexus 4 上测试)

PS : 相同的 Webview 适用于 4.2 及以下版本。

这是一个已知问题还是有解决方法?

【问题讨论】:

  • 您是否尝试明确设置webView.setVerticalScrollBarEnabled(true); - 只是为了它?
  • 刚刚尝试设置垂直滚动条,没有运气!

标签: android webview android-4.3-jelly-bean


【解决方案1】:

您是否尝试过使用 webview 以及在相对布局中的 Scrollview

<RelativeLayout 
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/bg_header"
    >

<ScrollView 
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    >

    <WebView 
        android:id="@+id/webView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />   

</ScrollView>

尝试将verticalscrolling设置为true。

【讨论】:

    猜你喜欢
    • 2011-05-11
    • 1970-01-01
    • 2016-05-31
    • 1970-01-01
    • 1970-01-01
    • 2011-08-26
    • 1970-01-01
    • 1970-01-01
    • 2012-07-03
    相关资源
    最近更新 更多