さまざまな TextView、ImageView、ListView を含むレイアウトに ScrollView を追加しようとしています。スクロールできるようにしたい理由は、すべてのテキストと画像がほぼすべてのスペースを占有し、ListView にはほとんど残らないためです。
このタフな実装方法がわかりません。レイアウト用の私の XML コードを次に示します。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical" >
<ImageView
android:id="@+id/pubInfoImg"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/pubInfoWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="10dp" />
<TextView
android:id="@+id/pubInfoTapsNo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5"
android:padding="10dp" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="0.7dip"
android:layout_centerVertical="true"
android:background="@android:color/holo_blue_dark" />
<TextView
android:id="@+id/pubInfoAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp" />
<TextView
android:id="@+id/pubInfoUrl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp" />
<TextView
android:id="@+id/pubInfoOpenhours"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp" />
<ListView
android:id="@+id/tapsListview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#BABABA"
android:divider="@android:color/transparent"
android:dividerHeight="0.0sp"
android:footerDividersEnabled="true"
android:headerDividersEnabled="true" />
</LinearLayout>