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

Stack Overflow | Abserve Tech | 10 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola . Or join the community to write better ones.
  1. 0

    How to select and unselect the recycleview in android

    Stack Overflow | 10 months ago | Abserve Tech
    java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling
  2. 0
    samebug tip
    Try to reset the previous listener before making any changes to the view.
  3. 0
    samebug 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.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android RecyclerView : notifyDataSetChanged() IllegalStateException

    Stack Overflow | 3 years ago | Arthur
    java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling
  6. 0

    crash report

    GitHub | 1 year ago | door43app
    java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Cannot call this method while RecyclerView is computing a layout or scrolling

    at android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll()
  2. Android v7
    RecyclerView$Adapter.notifyDataSetChanged
    1. android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2186)
    2. android.support.v7.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:4255)
    3. android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:9945)
    4. android.support.v7.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:5747)
    4 frames
  3. abservetech.com.foodapp
    Checkinpage$AddressAdapter1$1.onCheckedChanged
    1. abservetech.com.foodapp.Checkinpage$AddressAdapter1$1.onCheckedChanged(Checkinpage.java:857)
    1 frame
  4. Android Platform
    CompoundButton.setChecked
    1. android.widget.CompoundButton.setChecked(CompoundButton.java:127)
    1 frame
  5. abservetech.com.foodapp
    Checkinpage$AddressAdapter1.onBindViewHolder
    1. abservetech.com.foodapp.Checkinpage$AddressAdapter1.onBindViewHolder(Checkinpage.java:841)
    2. abservetech.com.foodapp.Checkinpage$AddressAdapter1.onBindViewHolder(Checkinpage.java:709)
    2 frames
  6. Android v7
    RecyclerView$Adapter.onBindViewHolder
    1. android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5471)
    1 frame