Android 中的滚动问题
在我的应用程序中,我有一个具有以下布局的活动,
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/white">
<WebView android:id="@+id/detail_title" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium"
android:padding="2dp" android:textColor="@android:color/black"
android:background="@android:color/white" />
<WebView android:id="@+id/detail_subtitle" android:orientation="vertical"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:padding="2dp" android:background="@android:color/white" />
<WebView android:id="@+id/wv3" android:orientation="vertical"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:background="@android:color/white" />
</LinearLayout>
wv3 有很多正确显示的 html 文本,但问题是我只在 wv3 中滚动,而布局的其余部分保持静态,这非常令人恼火。我希望整个布局都有滚动,而不仅仅是 wv3。
In my application i have an activity which has the following layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/white">
<WebView android:id="@+id/detail_title" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium"
android:padding="2dp" android:textColor="@android:color/black"
android:background="@android:color/white" />
<WebView android:id="@+id/detail_subtitle" android:orientation="vertical"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:padding="2dp" android:background="@android:color/white" />
<WebView android:id="@+id/wv3" android:orientation="vertical"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:background="@android:color/white" />
</LinearLayout>
wv3 has a lot of html text which appears properly but the problem is that i am getting scroll only in wv3 and the rest of the layout remains static which is quite irritating. i want that the whole of the layout has scroll and not only wv3.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样修改你的布局
Modifiy your layout like this