私は1つの大きなLinearLayout(垂直)(外側のテーブル)と3つの小さな線形レイアウト(水平)(各行に1つ)を持っています。内部のlinearlayoutsがスペース全体を占有するようにします。現在、それらは必要なスペースのみを占有します。
これが私のコードです:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background">
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton android:src="@drawable/Tag"
android:onClick="tagKillHandle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageButton android:src="@drawable/seekills"
android:layout_width="wrap_content"
android:onClick="seeKillsHandle"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton android:src="@drawable/track"
android:onClick="trackMeHandle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageButton android:src="@drawable/taste"
android:onClick="tasteHandle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton android:src="@drawable/calls"
android:onClick="duckCallsHandle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageButton android:src="@drawable/faq"
android:onClick="faqHandle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
行が画面全体を占めるようにしたい。これどうやってするの?何か案は?