Recyclerview с бесконечной прокруткой в nestedscrollview, запускает на Scrolled
У меня есть переработчик в nestedscrollview:
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<org.apmem.tools.layouts.FlowLayout
android:id="@+id/filter_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/green_main"
android:paddingLeft="@dimen/small_horizontal_margin"
android:paddingRight="@dimen/small_horizontal_margin"
/>
<android.support.v7.widget.RecyclerView
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbars="vertical"
android:paddingTop="@dimen/vertical_margin"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
Recyclerview имеет OnScrollListener, который обрабатывает бесконечную прокрутку, взятую из этого примера:https://guides.codepath.com/android/Endless-Scrolling-with-AdapterViews-and-RecyclerView, Однако кажется, что nestedscrollview запускает метод onScrolled, поэтому весь список элементов загружается сразу.
Вопрос: Как я могу предотвратить это поведение?
Обратите внимание, что все отлично работает с переработчиком, которого нет в nestedscrollview