嗨!即時通訊嘗試在我的活動頂部獲取一排按鈕,底部的一排按鈕以及兩者之間的webview。頂部和底部的行將被anochored,webview將根據其數據滾動。Eclipse Android XML佈局頁眉和頁腳
我的下面的代碼不太工作。誰能幫我嗎?。此刻,webview坐在兩個按鈕欄下方,爲什麼是這樣?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<com.appname.app.SegmentedRadioGroup
android:id="@+id/segment_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dip"
android:layout_span="2"
android:checkedButton="@+id/button_one"
android:orientation="horizontal" >
<RadioButton
android:id="@id/button_one"
android:button="@null"
android:gravity="center"
android:minHeight="33dip"
android:minWidth="40dip"
android:text=" Description "
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/radio_colors" />
<RadioButton
android:id="@+id/button_two"
android:button="@null"
android:gravity="center"
android:minHeight="33dip"
android:minWidth="40dip"
android:text=" Images "
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/radio_colors" />
<RadioButton
android:id="@+id/button_three"
android:button="@null"
android:gravity="center"
android:minHeight="33dip"
android:minWidth="40dip"
android:text=" Audio "
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/radio_colors" />
<RadioButton
android:id="@+id/button_four"
android:button="@null"
android:gravity="center"
android:minHeight="33dip"
android:minWidth="40dip"
android:text=" Weblinks "
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/radio_colors" />
</com.appname.app.SegmentedRadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
<Button
android:id="@+id/main_menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Main Menu" />
<Button
android:id="@+id/scan_exhibit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Scan New Exhibit" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_below="@id/header"
android:layout_above="@id/footer" >
<WebView
android:id="@+id/webview1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#000000" />
</RelativeLayout>
</LinearLayout>
我不能做,雖然作爲web視圖被定義爲相對佈局具有以下機器人:layout_below =「@ ID /報頭」機器人:layout_above =「@ ID /頁腳」>因此這些(報頭和頁腳)需要首先在我的線性佈局部分中定義 – user1096447 2011-12-13 19:25:08