1
如果我的WebView太大,我没问题,即使内容太大,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>
下面是截图:
任何一个可以帮助我解决这个问题?
你的答案是非常大的。谢谢你的帮助。我了解到我需要更多地使用RealativeLayout http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html –