Android RecyclerView notifyItemChanged() IllegalStateException “Cannot call this method while RecyclerView is computing a layout or scrolling”


If your Android app is crashing with error IllegalStateException “Cannot call this method while RecyclerView is computing a layout or scrolling”, you may try placing your notifyitemchanged inside a Runnable.

Assuming you have a call to notifyItemChanged() inside onBindViewHolder() that is making your app crash with IllegalStateException, you may try something like this:

Catzie

A Filipino who is a mobile & web developer on weekdays, and a baker on weekends. When I have time to spare, I blog, play video games, watch series (usually anime), cook dishes, draw, or spend a little time with pets. When I have the rare luxury of time, I get to travel and record song covers too! Follow on Twitter: @catzie

Leave a Reply

Your email address will not be published. Required fields are marked *