当我们使用RefreshLayout嵌套ListView进行下拉刷新时,有时候会出现listview可以上拉到底,但是下拉时就会进行刷新操作,而不是滑动listview了。
出现这种问题的原因是在RefreshLayout控件中,只能够放ListView或者LinearLayout单一控件,当RefreshLayout中放两个或多个并列布局时,就会出现滑动冲突问题。
如下布局:
<com.test.custompulltorefresh.RefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#303030">
<LinearLayout
android:layout_width="match_parent"