recyclerview-playground
recyclerview-playground copied to clipboard
Not working when enclosed inside a NestedScrollView
For my use case, I had to include a RecylerView a NestedScrollVIew. Once I do that, the layout manager does not work anymore. I thought it would be a height issue so I modified the FixedGridLayoutManager
to include setAutoMeasureEnabled(true)
. That caused the content to show up but the scrolling would not happen.
I also tried enabling and disabling NestedScrolling
on the RecyclerView.
Sample:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rvFanClubs"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingLeft="12dp"
android:paddingRight="12dp" />
</android.support.v4.widget.NestedScrollView>
@saurabharora90 I'd advice you to replace the NestedScrollView
with a RecyclerView
with a single view adapter and see if it fixes the issue