0

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>
  • Does this answer your question? [How to use RecyclerView inside NestedScrollView?](https://stackoverflow.com/questions/31000081/how-to-use-recyclerview-inside-nestedscrollview) – Abhishek Dutt Jul 07 '22 at 04:05
  • not working for me – Shivam Kumar Jul 07 '22 at 05:23
  • please tell me another solution in my the nested scroll view just lag for milli second i donot why and i want make scroll view smooth like youtube in home view basically scroll view only lag at time of new item is added – Shivam Kumar Jul 07 '22 at 05:45

1 Answers1

0
android:nestedScrollingEnabled="false"

Add this to your RecyclerView