4
所以我有一個webview我想顯示爲對話框。我希望webview能夠填充整個屏幕,除了下面的一個按鈕,我希望停留在對話框的底部,而不管webview中有多少內容。目前,我的webview填充對話框足以將按鈕從屏幕上移開。我確信這是非常簡單的事情,但對於我來說,我一直無法找到佈局,視圖和屬性值的神奇組合,以使它發揮出色。只是要清楚,我已經得到它,所以按鈕漂浮在web視圖上,但我希望webview停止在按鈕上方並滾動,如果這是有道理的。Android佈局問題與下面的按鈕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>
你先生,是我最喜歡的人。即使經過數月的Android開發,我仍然在學習一些基本的東西。你有我的感激之情! – MattC 2009-11-05 04:25:50
它是修復前向參考問題的1.6: http://android-developers.blogspot.com/2009/10/ui-framework-changes-in-android-16.html – I82Much 2009-11-05 15:03:51