Android layout 如何为同时包含文本、图像和列表视图的布局实现ScrollView

Android layout 如何为同时包含文本、图像和列表视图的布局实现ScrollView,android-layout,android-listview,android-linearlayout,android-xml,android-scrollview,Android Layout,Android Listview,Android Linearlayout,Android Xml,Android Scrollview,我正在尝试向布局中添加一个包含各种文本视图、图像视图和列表视图的滚动视图。我之所以希望能够滚动,是因为所有的文本和图像占据了几乎所有的空间,而ListView几乎没有留下任何空间 我不知道如何实施这项艰巨的任务。 这是我的布局XML代码 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:lay

我正在尝试向布局中添加一个包含各种文本视图、图像视图和列表视图的滚动视图。我之所以希望能够滚动,是因为所有的文本和图像占据了几乎所有的空间,而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>

如果要在列表末尾设置imageview或textview,则可以使用ListView.addFooterView(footerView);它将添加android中listview的foooter中的视图