Scroll callbacks might be run during a measure & layout pass where you cannot change the RecyclerView data. Any method call that might change the structure of the RecyclerView or the adapter contents should be postponed to the next frame. java.lang.IllegalStateException: at android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2403) at android.support.v7.widget.RecyclerView $RecyclerViewDataObserver.onItemRangeInserted(RecyclerView.java:4634) at android.support.v7.widget.RecyclerView $AdapterDataObservable.notifyItemRangeInserted(RecyclerView.java:10472) at android.support.v7.widget.RecyclerView $Adapter.notifyItemInserted(RecyclerView.java:6214)