I have a recycler view inside a ScrollView. I want to disable the recycler view scroll so that it listens to its parent layout, A ScrollView!
            Asked
            
        
        
            Active
            
        
            Viewed 3.3k times
        
    15
            
            
        - 
                    read ViewGroup docs, pay attention on intercepting MotionEvents – pskink Mar 10 '15 at 13:24
- 
                    Possible duplicate of [RecyclerView inside ScrollView is not working](https://stackoverflow.com/questions/27083091/recyclerview-inside-scrollview-is-not-working) – Adil Hussain Apr 01 '18 at 09:51
3 Answers
46
            
            
        This should solve your RecyclerView nested scrolling.
 mRecyclerView.setNestedScrollingEnabled(false);
RecyvlerView implements NestedScrollingChild
for instance if RecyclerView parent is a ScrollView or ListView or RecyclerView or any AbsListView
disable scrolling for the child RecyclerView.
 
    
    
        mipreamble
        
- 1,415
- 12
- 17
- 
                    3
- 
                    1Spent some time trying to fix this by my own by adjusting motion events until I saw your answer which fixed it right away. @Tim, I don't see why this wouldn't work pre Lollipop? – Lucas Arrefelt Nov 21 '15 at 22:45
- 
                    1
- 
                    @Tim not true, NestedScrollingChild and RecyclerView are part of the support libraries – ashishduh Oct 20 '16 at 18:02
6
            Logically, it is not a good idea to put ListView inside a ScrollView. However, if you insist then:
- 
                    1Great. Finally I sorted it out. What I did is dynamically using my recycler view layout position. Problem solved ! – LEE Mar 12 '15 at 06:29
- 
                    
- 
                    1@MuhammadRiyaz i have used this: http://stackoverflow.com/a/27616854/3736955 . But scrolling scrollview is not smooth . So used below answer (http://stackoverflow.com/a/32283439/3736955) to make it smooth – Jemshit Sep 03 '15 at 08:50
 
     
     
    