私はマスター/詳細アプリで作業しており、私の activity_twopane には詳細ペインの下部にボタン バー (配置したい) があります。破片のディテールの下に配置できますが、どうしても下に揃えることができません。
を使用してシングルペインモードで正常に動作していますandroid:layout_weight="1"
が、ネストされたウェイトを使用するという警告があっても、2 ペインモードでは動作しません。
これは今のようです:
そして、これは私がこれまでに得たレイアウト xml です:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:baselineAligned="false"
android:divider="?android:attr/dividerHorizontal"
android:orientation="horizontal"
android:showDividers="middle"
tools:context=".DocumentoListActivity" >
<fragment
android:id="@+id/documento_list"
android:name="br.com.DocumentoListFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
tools:layout="@android:layout/list_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:orientation="vertical">
<FrameLayout
android:id="@+id/documento_detail_container"
android:layout_width="match_parent"
android:layout_height="fill_parent" />
<LinearLayout
android:id="@+id/documento_twopane_buttons"
style="android:attr/buttonBarStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/documento_twopane_buttonBaixar"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 1" />
<Button
android:id="@+id/documento_twopane_buttonAssinar"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 2" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
私のボタンバーは の中にあるのでLinearLayout
、その中には使えませんRelativeLayout with android:layout_alignParentBottom="true"
。
質問
これは s で実行できますか、それともすべてを変更して??LinearLayout
に入れる必要がありますか?RelativeLayout