This is more like a generic question, but after lot of search and try I am not able to understand why this is so difficult to achieve. This is the closest answer I can find
Add this wherever you have declared RecyclerView
in your Activity
or Fragment
RecyclerView mRecyclerview = (RecyclerView) findViewById(...);
mRecyclerview.setNestedScrollingEnabled(false);
setNestedScrollview(false)
does the work for you.
I just faced this problem, and disabling nested scroll fixed it. Do it like this:
yourRecyclerview.setNestedScrollingEnabled(false);
Or you can change the value in xml file where you defined RecyclerView:
<android.support.v7.widget.RecyclerView
android:id="@+id/yourRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"/>
I just faced this problem, and i got
I put the RecyclerView
in ScrollView
So please never put the RecyclerView
inside the ScrollView
that may also cause.
mLayoutManager.findFirstVisibleItemPosition()
That always return a fixed value. And also check
recyclerview.setNestedScrollingEnabled(false);
You need to use the "Picasso" library to load image asynchronously, and also make sure that the size of the image which you load is similar to the size of image view in the layout, using the fit()
function. Also, if you are using a recycler view inside the scroll view, make sure to set nested scrolling
to false.
I solved my issue using the above three methods
android:animateLayoutChanges="false"
just add this
animateLayoutChanges = true
in recyclerview xml