pager-layoutmanager icon indicating copy to clipboard operation
pager-layoutmanager copied to clipboard

notifyItemRemoved(position);会有闪烁

Open hellozengms opened this issue 6 years ago • 1 comments

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

hellozengms avatar Jul 20 '18 03:07 hellozengms

将 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); // } // }

baihuahuade avatar Feb 03 '21 02:02 baihuahuade