2つのImageButtonがあり、一方を他方の上にスタックしようとしています。基本的に、それぞれが使用可能なスペースの50%を占める2つの大きなボタンを備えた画面を作成したいと思います。コードは以下のとおりです。これは、それが生成するレイアウトのキャプチャですhttp://imgur.com/cQT0W.png私が親のlayout_gravityとgravityで遊んだことがあります。layout_height = fill_parentで両方の子を設定しても機能せず、親の重力をfill_verticalに設定することもできません。
<!-- Notes tab -->
<LinearLayout android:id="@+id/tabNotes"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="6dp"
android:orientation="vertical">
<ImageButton android:src="@drawable/ic_btn_speak_now" android:id="@+id/imgSpeakNow"
android:background="#FFFF00"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<ImageButton android:src="@drawable/ic_btn_compose" android:id="@+id/imgCompose"
android:background="#FF00FF"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>