Open csbenz opened 7 years ago
Just came across the same crash. Did you find a clue on where to look?
@qmetzler-luna Unfortunately not
Have the same problem. Did you find solution?
OMG this works for me: <android.support.v7.widget.RecyclerView android:id="@+id/chips_recycler" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="8dp" android:paddingBottom="8dp" /> this doesn't work: <android.support.v7.widget.RecyclerView android:id="@+id/chips_recycler" android:layout_width="match_parent" android:layout_height="match_parent" />
Having same issue here. Please who managed to find a solution to this?
Ok. I think I found a work around on this.
I basically opened the AbstractPositionIterator.java file and rewrote the move
method from
public void move(@IntRange(from = 0) int pos) { if (pos >= itemCount) throw new IllegalArgumentException("you can't move above of maxItemCount"); if (pos < 0) throw new IllegalArgumentException("can't move to negative position"); this.pos = pos; }
to
public void move(@IntRange(from = 0) int pos) { if (pos >= itemCount) { pos = itemCount; } if (pos < 0) throw new IllegalArgumentException("can't move to negative position"); this.pos = pos; }
and that fixed it for me.
it sames that the pos belong to the previous data. For example, you put datas which size is 20, and scroll it to the bottom, so the current pos is 20, but now you want to update the recycleview, you put another datas which size is 10, so the pos 20 is big than 10. so you'd betther scroll the recycleview to the start positon.
public void setDatas(List
having the same problem.
This issue occurs, when first-time data added to list and then immediately cleared, After clearing data list then again adding data to list.
How can I fix this issue?
I place recyclerview in NestedScrollView to fix it, you can try
Just setAdapter() every time instead of notifyDataSetChange() . it solved my crash.
Just setAdapter() every time instead of notifyDataSetChange() . it solved my crash.
Thank you @AmritpalSingh5 it working perfectly!!
I'm getting the following error from users on many api's and many different devices. Any idea why?