2014-12-02 67 views
0

我知道這已被問無窮時間已經但我試過所有的解決方案,並沒有結果。ListView始終顯示滾動條內SwipeRefreshLayout

我希望垂直滾動條始終顯示在屏幕上。

這是我的xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:orientation="vertical"> 

    <android.support.v4.widget.SwipeRefreshLayout 
     android:id="@+id/swipe_refresh_layout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 

     <ListView android:id="@+id/list_view" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:paddingRight="16dp" 
       android:paddingLeft="16dp" 
       android:background="#ffacb8ba" 
       android:fadeScrollbars="false" 
       android:scrollbarFadeDuration="0" 
       android:scrollbarAlwaysDrawVerticalTrack="true"/> 

    </android.support.v4.widget.SwipeRefreshLayout> 

</LinearLayout> 

在我的代碼,我還設置

listView.setFastScrollEnabled(true); 

我認爲這個問題可能涉及到的事實,列表視圖是一個swiperefreshlayout裏面,我不不知道。

幫助!!!

回答