how to disable recycler view scrolling so that it listens to Scrollview layout?
Logically, it is not a good idea to put ListView
inside a ScrollView
. However, if you insist then:
- You may either increase the
ListView
height based on the sum of its rows height as mentioned here. - Or let the recycling in place but intercept the touch on
ListView
to redirect scrolling to its parent ScrollView as mentioned here.
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.
Add this line in xml,
android:nestedScrollingEnabled="false"