所以我有一个webview我想显示为对话框.我希望webview能够填满整个屏幕,除了下面的按钮,我想留在对话框的底部,无论webview中有多少内容.目前,我的webview填满了对话框,足以将按钮从屏幕上移开.我确信这很容易,但对于我的生活,我无法找到布局,视图和属性值的神奇组合,以使其发挥得很好.为了清楚起见,我已经得到它,因此按钮浮动在webview上,但我希望webview停在按钮上方并滚动,如果这是有道理的.
<RelativeLayout android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<WebView android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button android:text="Ok"
android:id="@+id/btnOk"
android:layout_width="120px"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)