Android 如何使ScrollView与具有多个子布局的RelativeLayout一起填充屏幕?

Android 如何使ScrollView与具有多个子布局的RelativeLayout一起填充屏幕?,android,layout,scrollview,Android,Layout,Scrollview,我有一个布局,只有一个滚动视图可见。它有一个相对布局作为其子级。此布局有几个其他布局(主要是文本视图)作为其子级。当文本不够大时,滚动视图不会自行展开以适应整个屏幕。相反,它在背景显示的底部显示一个间隙。我尝试在ScrollView上设置fillViewPort=true,但这只会使第一个子布局(RL1)填满屏幕 <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas

我有一个布局,只有一个滚动视图可见。它有一个相对布局作为其子级。此布局有几个其他布局(主要是文本视图)作为其子级。当文本不够大时,滚动视图不会自行展开以适应整个屏幕。相反,它在背景显示的底部显示一个间隙。我尝试在ScrollView上设置
fillViewPort=true
,但这只会使第一个子布局(RL1)填满屏幕

<?xml version="1.0" encoding="utf-8"?>
  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/background_image">

   <ProgressBar android:id="@+id/progressBar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:visibility="gone"/>

    <ScrollView
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:fillViewPort="true"
      android:scrollbars="none">

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingTop="10px">

      <RelativeLayout android:id="@+id/list"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:paddingTop="10px">

        <!-- This layout is filling the screen if I set fillViewPort="true" -->
        <RelativeLayout  android:id="@+id/RL1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

            <!--TextViews and ImageViews -->

       </RelativeLayout>

        <RelativeLayout android:id="@+id/RL2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

            <!--TextViews and ImageViews -->

        </RelativeLayout>

        <RelativeLayout android:id="@+id/RL3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" >

            <!--TextViews and ImageViews -->

        </RelativeLayout>

        <RelativeLayout  android:id="@+id/RL4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

            <!--TextViews and ImageViews -->

        </RelativeLayout>

     </RelativeLayout>

   </RelativeLayout>

  </ScrollView>

</FrameLayout>

fillViewPort应为fillViewPort