Android可扩展列表视图没有填满屏幕

Android可扩展列表视图没有填满屏幕,android,android-layout,android-fragments,android-activity,Android,Android Layout,Android Fragments,Android Activity,我使用可扩展列表视图创建一些嵌套列表;它位于带有列表和提交按钮的视图上 但是,列表从不填充屏幕,它只填充视图的一小部分 在下面的代码示例中,我使用滚动视图显示submit按钮。在使用滚动视图之前,从未显示submit(提交)按钮,然后列表将填满所有屏幕: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/andro

我使用可扩展列表视图创建一些嵌套列表;它位于带有列表和提交按钮的视图上

但是,列表从不填充屏幕,它只填充视图的一小部分

在下面的代码示例中,我使用滚动视图显示submit按钮。在使用滚动视图之前,从未显示submit(提交)按钮,然后列表将填满所有屏幕:

   <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="?android:attr/actionBarSize"
    android:background="@color/blue_overlay_2x"
    >
    <ScrollView
        android:id="@+id/contain"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/actionbar"
        android:scrollbars="vertical">
 <LinearLayout
     android:id="@+id/tripReview"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
     android:paddingLeft="5dp"
     android:paddingRight="5dp">

     <ExpandableListView
         android:id="@+id/feed_list"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:divider="@android:color/transparent"
         android:drawSelectorOnTop="true"
         android:gravity="top"
         android:listSelector="@android:color/transparent"
         android:numColumns="1"
         android:groupIndicator="@null"
         android:padding="0dip"
         android:scrollbarStyle="outsideOverlay"
         android:smoothScrollbar="true"

         android:stretchMode="columnWidth"

         android:transcriptMode="normal" />
         <TextView
             android:id="@+id/submit_button"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:background="@drawable/bg_button_color_theme"
             android:gravity="center|center_horizontal"
             android:padding="@dimen/space_2_3x"
             android:text="@string/submit_support"
             android:textAllCaps="true"
             android:textColor="@color/pure_white"
             android:textSize="@dimen/text_size_small" />
 </LinearLayout>
    </ScrollView>  
    <include layout="@layout/load_more_progress_bar_layout" />
</RelativeLayout>


如何获得可扩展列表视图以填充屏幕?

如果您希望进度条位于其他布局的顶部,我将使用框架布局作为顶部布局,而不是相对布局。进度条显示正常,问题在于列表在数据填充后其高度不会增加,虽然它的高度是wrap\u content,但您是否尝试将可扩展列表视图的
android:layout\u height=“wrap\u content”
更改为
android:layout\u height=“match\u parent”