水平のスクロールバーを上部(ボタンを含む)に配置し、その後に相対レイアウト(その中に入れたものを含めることができます)と最後の水平スクロールバーは一番下に並んでいます。水平スクロールバーを上/下に固定し、中間の相対的なレイアウトをその間のすべてのものに強制するにはどうすればよいですか?あなたがLinearLayout
の内側layout_weight
を使用することができますAndroidでこれらの3つのアイテムを配置する方法
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:id="@+id/top_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"></RelativeLayout>
<RelativeLayout
android:id="@+id/bottom_container"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content">
</RelativeLayout>
<RelativeLayout
android:id="@+id/middle_container"
android:layout_width="match_parent"
android:layout_below="@id/top_container"
android:layout_above="@id/bottom_container"
android:layout_height="match_parent"></RelativeLayout>
</RelativeLayout>
あなたが投稿することができますのcreenshot or wireframe or code –
layout_weight = "" –
のように、このレイアウトのパーティションを使用することができます。内容をラップする高さを上部と下部に持たせたいが、中心の相対レイアウトはすべての間に広がるようにする。 –