GcsSloop / pager-layoutmanager

[暂停维护]Android 网格分页布局。
http://www.gcssloop.com/
Apache License 2.0
1.13k stars 182 forks source link

notifyItemRemoved(position);会有闪烁 #23

Open hellozengms opened 6 years ago

hellozengms commented 6 years ago

我做删除时, notifyItemRemoved(position);会有闪烁,是什么原因呢,谢谢

baihuahuade commented 3 years ago

将 PagerGridLayoutManager 中的 预存储View 这段代码注释掉就可以了 // if (mOffsetX == 0 && mOffsetY == 0) { // // 预存储View // for (int i = 0; i < mOnePageSize; i++) { // if (i >= getItemCount()) break; // 防止数据过少时导致数组越界异常 // View view = recycler.getViewForPosition(i); // addView(view); // measureChildWithMargins(view, mWidthUsed, mHeightUsed); // } // }