Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview

recyclerview inside recyclerview scroll issue android
recyclerview inside recyclerview not scrolling smoothly
recyclerview inside scrollview not showing all items
android-recyclerview inside nestedscrollview scroll to position
recyclerview inside bottomsheet not scrolling
nested scrollview not scrolling android
scrollview inside recyclerview item android
recyclerview scrolling issue

I am using RecyclerView inside NestedScrollView and it works. But when I use RecyclerView inside LinearLayout or something, it scroll in various speed depending on gesture. The scroll listen to gesture and if I slide up only a bit, then it scroll a little bit while if I slide up really fast, then it scroll really fast. Now my problem is that RecyclerView inside NestedScrollView certainly scroll but fast scroll does not work. However I slide up fast or slow, RecyclerView or NestedScrollView only scroll a little bit.

How can I make my NestedScrollView or RecyclerView inside that scroll view scroll in various speed?

try

recyclerView.setNestedScrollingEnabled(false);

RecyclerView within NestedScrollView Scrolling Issue, Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview. Posted by: admin  I'm new in android development . I got issue of nested scrollview. there are three recyckerviews inside nested scroll view. there is only one parent Linearlayout inside my nested scrollview. I also

By default setNestedScrollingEnabled works only after API-21.

You can use ViewCompat.setNestedScrollingEnabled(recyclerView, false); to disable nested scrolling for before and after API-21(Lollipop). Link to documentation.

Hope this help!

Handling Scrolls with CoordinatorLayout · codepath/android_guides , As we already know that recyclerView has a smooth scrolling by itself but when we need to put recyclerView within any scrollView it will not work like the below  Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview I am using RecyclerView inside NestedScrollView and it works. But when I use RecyclerView inside LinearLayout or something, it scroll in various speed depending on gesture.

I was working on android 16 where this was not possible to use setNestedSCrollEnabled method,

What I end up doing to stop RecyclerView from handling Scrolls.

Like in LinerLayoutManager i made canScrollHorizontally, canScrollVertically to return false by default.

myRecyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false){
            @Override
            public boolean canScrollHorizontally() {
                return false;
            }

            @Override
            public boolean canScrollVertically() {
                return false;
            }
        });

RecyclerView Laggy inside NestedScrollView/LinearLayout , When a Snackbar is rendered, it normally appears at the bottom of the visible screen. So long as the CoordinatorLayout is used as the primary layout, this animation or any other View capable of nested scrolling such as NestedScrollView. When a CoordinatorLayout notices this attribute declared in the RecyclerView,  Questions: I am getting a weird scrolling behavior when I add a RecyclerView inside a NestedScrollView. What happens is that whenever the scrollview has more rows than can be shown in the screen, as soon as the activity is launched, the NestedScrollView starts with an offset from the top (image 1).

After several iterations, I came up with a solution.

  1. If you are using RecyclerView, then:

    recyclerView.setNestedScrollingEnabled(false);
    
  2. If you are using LinearLayout inside NestedScrollingView, take the LinearLayout inside a normal ScrollView and then set its scrolling to

    scrollView.setNestedScrollingEnabled(false);
    

How to use RecyclerView inside NestedScrollView?, How to use RecyclerView inside NestedScrollView? Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal  Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview ; Recycler view inside NestedScrollView causes scroll to start in the middle ; how to detect the position of the scroll nestedscrollview android at the bottom?

android:overScrollMode="never

  <android.support.v4.widget.NestedScrollView
    android:id="@+id/nestedScrollView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:overScrollMode="never">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </LinearLayout>
 </android.support.v4.widget.NestedScrollView>

St4k, You can't use a recycler view within a nested scroll view. It's not intended to contain further scrollable views but it's because it's a child of a scrolling layout itself  Currently the RecyclerView is laid out as very small (it shows 2 items out of 5 that it contains) and it scrolls independently of the ScrollView, which is obviously not great UX. I would like to get the RecyclerView to not scroll and to extend so that all its items are visible. (I know it’s stupid to use a RecyclerView in this case.

ScrollView, About St4k. Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview. 90. I am using  You can't use a recycler view within a nested scroll view. It's not intended to contain further scrollable views but it's because it's a child of a scrolling layout itself that you need the nested scrolling view.

recyclerview inside nestedscrollview with EndlessRecyclerScroll is , Scroll view may have only one direct child placed within it. Never add a RecyclerView or ListView to a scroll view. For vertical scrolling, consider NestedScrollView instead of scroll view which offers greater onInterceptTouchEvent() and all touch processing must happen in onTouchEvent​() like normal. my recyclerview is inside nestedscrollview, i want to add endless scroll in the recyclerview with data from realm database. i tried with the example in this repo but my case is little bit weird. this is what happen : i run the code below

Load More RecyclerView inside Nested Scroll View and Coordinator , recyclerview inside nestedscrollview with EndlessRecyclerScroll is buggy. my recyclerview is inside nestedscrollview, i want to add endless scroll in the recyclerview And if that's the case it's not the FastAdapter's fault, as the Can we hack fast adapter to prevent this endless scroll without scrolling? :) and now you have a horizontally scrolling view. Nested ScrollViews. Adding a ScrollView within another ScrollView can be difficult. Most of the times it won’t end well. You will end up adding few workarounds. Instead, use the NestedScrollView as outlined here. A working sample can be found here as this is very useful when working with

Comments
  • recyclerView.setNestedScrollingEnabled(false); This really works !!
  • stackoverflow.com/questions/27083091/… Solution can be found here.
  • But by this setting, recyclerview does not recycle views! what's your idea about it?
  • Actually I am adding two or more recycler views with different layout managers (such as Linear Layout and Grid Layout) inside my layout which also include banner, and other views. So to handle the recycler view like that, putting all of these inside the Nested Scroll View fix for me.
  • I dont know how this answer got so many upvotes. If disabling nested scroll then it is defeating it's purpose. What if I want to use nested scrolls and recycler?? Something like CoordinatorLayout, AppBarLayout and RecyclerView??
  • Thanks @JimitPatel , this is exactly my issue at the moment. I have a recycleview within a nestedscroll view and I can't scroll.stackoverflow.com/questions/41259756/…
  • @Karoly need to customize nested scrolls... I've that... Will post that in few hours... Currently, I'm traveling. I faced that issue in parallax effect with recycler view after toolbar.
  • This actually worked for me. I had a RecyclerView, inside a LinearLinear, inside a ScrollView.
  • This is a good answer because it points the way to fixing the fling scroll issue without breaking the RecyclerView's main benefit, loading only the visible views and recycling them when they are scrolled out of sight. People may have down-voted it because a fixed value like 800dp is not going to work in all screen sizes and orientations, but the layout_height value could be calculated and set programmatically - a bit messy, but it solves both issues.