Reputation: 3605
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!
Upvotes: 15
Views: 32816
Reputation: 1415
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.
Upvotes: 46
Reputation: 68187
Logically, it is not a good idea to put ListView
inside a ScrollView
. However, if you insist then:
ListView
height based on the sum of its
rows height as mentioned here.ListView
to redirect scrolling to its parent ScrollView as mentioned
here.Upvotes: 6