java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

This probably occurs because you are calling notifyItemInserted(position);, notifyItemChanged(position), or notifyItemRemoved(position); from a background thread (or from a callback, which runs on a background thread). Use a Handler to solve it.

,
via stackoverflow.com by Unknown author

You can find the exact answer on the link.

Solutions on the web

via Stack Overflow by Abserve Tech
, 1 year ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via Stack Overflow by Muharrem
, 4 months ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via Stack Overflow by Gunaseelan
, 10 months ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via Stack Overflow by Arthur
, 1 year ago
Cannot call this method while RecyclerView is computing a layout or scrolling
via Stack Overflow by Esby
, 1 year ago
Cannot call this method while RecyclerView is computing a layout or scrolling
java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling
at android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2186)
at android.support.v7.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:4255)
at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:9945)
at abservetech.com.foodapp.Checkinpage$AddressAdapter1$1.onCheckedChanged(Checkinpage.java:857)
at android.widget.CompoundButton.setChecked(CompoundButton.java:127)
at abservetech.com.foodapp.Checkinpage$AddressAdapter1.onBindViewHolder(Checkinpage.java:841)
at abservetech.com.foodapp.Checkinpage$AddressAdapter1.onBindViewHolder(Checkinpage.java:709)

Users with the same issue

13 times, 1 year ago
2 times, 11 months ago
2 times, 6 months ago
Once, 6 months ago
7 times, 11 months ago
3 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.