I'm using recyclerview inside nestedscrollview to scroll in the full page size but that ruined the pagination functionality because it auto loads all the pages without user scrolling.
here is my xml layout
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View android:id="@+id/header_view"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginTop="21dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/picked_up_rv"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header_view" />
</androidx.constraintlayout.widget.ConstraintLayout>
And I'm using Paging 3 for pagination
implementation "androidx.paging:paging-runtime-ktx:3.1.0"