我的设置相当简单:
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swiperefresh"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="220dp"/>
</android.support.v4.widget.SwipeRefreshLayout>
onCreate()
的内容:
layoutManager = new LinearLayoutManager( this );
layoutManager.setOrientation( LinearLayoutManager.HORIZONTAL );
topTopicRecyclerView.setLayoutManager( layoutManager );
现在,当我向左或向右滑动recyclerView并且滑动角度不是完美水平时,SwipeRefreshLayout会跳入并控制滚动。这会导致recyclerView内部出现令人讨厌的视觉“抽搐”。
如果禁用SwipeRefreshLayout,则一切正常。
那么,我如何取消SwipeRefreshLayout对RecyclerView区域的滚动控制?