我想创建一个什么似乎是简单的布局,但我遇到了一些问题。 布局由一个标题,一个网页视图的主体和一个底部的页脚横幅组成,如附图所示。android webview布局取剩余空间
我需要的WebView采取页眉和页脚之间的所有剩余空间。
我已经试过这样:
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:background="@drawable/back"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:id="@+id/banner"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/banner" />
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bck"
android:layout_weight="2"
android:layout_gravity="center"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="4">
android:id="@+id/banner_adview"
android:layout_width="320dip"
android:layout_height="50dip"
android:layout_gravity="center"
android:layout_alignParentBottom="true" />
2012-04-13
Udi Idan