【发布时间】:2012-04-13 09:41:07
【问题描述】:
我尝试了很多选项,但我的 webview 不能垂直滚动,因为它可以很好地水平滚动。我在我的 android 应用程序中添加了 webview 以在应用程序中显示一些 Web 内容。内容只是文字。但它超过了 webview 的高度,所以我想为用户提供滚动它以观看下一页内容的设施。但是 webview 不会水平滚动。
这是 xml,我只是在其中加载 html 字符串。
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
/>
请帮助我并提供最佳解决方案。提前致谢。
【问题讨论】:
-
你应该写一些代码以及你是如何使用网络视图的,所以有人可以帮助你
-
@AviKumarManku 现在你可以看到 webview 的 xml,我只是在其中加载 XML 字符串。我可以通过手机键盘滚动它,但不能通过触摸来滚动。
-
@sanchitsingh 你在 ScrollView 中使用 webview 吗?