I am using a recycler view with multiple views nested in it recycler work fine and it also scroll smoothly but when I put recycler view inside the nested scroll view the scroll of nested view is lag or you can say delay for few second when the new item is add in recycler view .For clarity I already set the recycler view nested scroll to false and I am using NestedScrollView because I want to show progress bar when user come to end of recycler view and load more item and I also try to add block descendant to xml file but not work my xml code:
<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:id="@+id/home_fragement"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:overScrollMode="never"
tools:context=".Content_Maint_Fragment.HomeFragment"
>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:focusableInTouchMode="true"
android:focusable="true"
android:descendantFocusability="blocksDescendants"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/home_recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.recyclerview.widget.RecyclerView>
<ProgressBar
android:id="@+id/progressBar2"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>