LinearLayout
私はこのようなレイアウトをルート要素として作成し、子に重みを付けて画面のプロパティを動的に割り当てる傾向があります。レイアウト定義をコンパクトに保ち、追加のIDを定義する必要がありません。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView ... />
<ImageView ... />
...
<ImageView ... />
</LinearLayout>
</ScrollView>
<!-- footer here -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
...
</LinearLayout>
</LinearLayout>
RelativeLayout
ただし、ルート要素としてScrollView
、下に配置されたフッターの「上」に配置されたものを使用すると、パフォーマンスの点でおそらくわずかに優れていますが、このような単純なビュー階層の場合に目立った違いが生じるとは思えません。RelativeLayoutアプローチでは、いくつかのIDを割り当てる必要があります(少なくともフッターに)。