4

在我的應用程序正在使用CoordinatorLayout.When我想滾動很多額外的空間available.And我改變了使用設置協調器佈局height.But當我試圖改變選項卡顯示額外的空間。當我在表單tab1,tab2,tab3中單擊時沒有問題。但是當我試圖使用tab3,tab2,tab3和tab2中的tab1顯示大量額外空間時。額外的空間使用協調器佈局,而滾動

1) In my main activity am using Observable scrollview. 

    <?xml version="1.0" encoding="utf-8"?> 
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/kudix_cordinator" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"> 

    <android.support.design.widget.AppBarLayout 
     android:id="@+id/appbar" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:background="?attr/colorPrimary" 
     android:fitsSystemWindows="false" 
     android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
     app:layout_collapseMode="pin"> 

     <android.support.design.widget.CollapsingToolbarLayout 
      android:id="@+id/htab_collapse_toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="250dp" 
      android:layout_marginBottom="0dp" 
      app:contentScrim="?attr/colorPrimary" 
      app:titleEnabled="false"> 

      <ImageView 

       android:layout_width="match_parent" 
       android:layout_height="@dimen/parallax_image_height" 
       android:background="@drawable/ic_launcher" 
       android:fitsSystemWindows="true" 
       android:scaleType="centerCrop" 
       app:layout_collapseMode="parallax" /> 

      <android.support.design.widget.TabLayout 
       android:id="@+id/tabs" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_gravity="bottom" 
       app:tabIndicatorColor="@android:color/white" 
       app:tabSelectedTextColor="@android:color/white" 
       app:tabTextColor="@color/white" /> 

     </android.support.design.widget.CollapsingToolbarLayout> 

    </android.support.design.widget.AppBarLayout> 


    <android.support.v4.view.ViewPager 
     android:id="@+id/kudix_club_viewpager" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_marginBottom="10dp" 
     android:layout_marginLeft="15dp" 
     android:layout_marginRight="15dp" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior" 
     /> 
</android.support.design.widget.CoordinatorLayout> 

每個選項卡片段包含不同類型的UI。

+0

你真的想要多餘的空間?你能提供一個截圖! –

+0

底部有很多空間 –

+1

如果您沒有內容可以填充,通常會有空格!這不正常! –

回答

2

其實它是從我的列表視圖高度從其他佈局。進度對話框並沒有解僱,所以API繼續調用。並在該API我設置協調員佈局高度。對於每個選項卡設置協調員佈局高度。