android – RecyclerView notifyDataSetChanged scrolls to top position-ThrowExceptions

Exception or error: when calling notifyDataSetChanged on RecyclerView it doesn’t retain the scroll position and scrolls to top, is there any solution to retain it’s scroll position? How to solve: If your RecyclerView list item parent has “wrap_content” property, Recyclerview calculates the heights again and scrolls top. There are two solutions: Set your height a …

android – RecyclerView laggy scrolling-ThrowExceptions

Exception or error: I am loading 400×200 images in RecyclerView, but scrolling is laggy on 2k devices. I am using Picasso for loading images from resource. As you can see in the demo images are blurry on 2k screen, but if I load higher resolution images the situation gets worse. How to fix this, I …

android – Pagination not work for the RecyclerView within NestedScrollView-ThrowExceptions

Exception or error: How to implement pagination of recyclerview that is within NestedScrollView? How to solve: Follow this steps : 1. Set nested scrolling enabled false of recycler view. recyclerView.setNestedScrollingEnabled(false); 2. Add scroll listner to nested scrollview. mScrollView.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() { @Override public void onScrollChanged() { View view = (View)mScrollView.getChildAt(mScrollView.getChildCount() – 1); int diff = (view.getBottom() …

android – How to avoid blocking of scrolling itself when using setNestedScrollingEnabled(false)?-ThrowExceptions

Exception or error: Background We have quite a complex layout that has CollapsingToolbarLayout in it, together with a RecyclerView at the bottom. In certain cases, we temporarily disable the expanding/collapsing of the CollapsingToolbarLayout, by calling setNestedScrollingEnabled(boolean) on the RecyclerView. The problem This usually works fine. However, on some (bit rare) cases, slow scrolling on the …