如果我的 WebView 这么大,我没有问题,并且 WebView 高度适合屏幕高度,即使内容如此之大,我也可以滚动 WebView 的内容。但是如果 WebView 的内容很少,WebView 的高度就不适合屏幕了。
这是我的布局:
<?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="wrap_content" >
<ScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fitsSystemWindows="true">
<WebView android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fitsSystemWindows="true" />
</ScrollView>
<LinearLayout android:id="@+id/media_player"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="visible">
<Button android:textStyle="bold"
android:id="@+id/ButtonPlayStop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:drawable/ic_media_play" />
<SeekBar android:id="@+id/SeekBar"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_below="@id/ButtonPlayStop" />
</LinearLayout>
这是屏幕截图:
任何人都可以帮助我解决这个问题?