您需要使用android:layout_above=“@+id/btnok”作为您的webview,并填写_parent作为webview的宽度和高度。
但是,需要注意的是,在1.5及以下版本中,为了正确识别XML,需要指定相对布局视图。换句话说,您必须先使用按钮,然后使用WebView,因为WebView将引用该按钮。我认为这在1.6或2.0中已经被改变了,但我不肯定这一点。
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
android:id="@+id/btnOk"
android:layout_width="120px"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
android:layout_above="@+id/btnOk"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>