mirror of
https://github.com/Tencent/QMUI_Android.git
synced 2026-10-29 03:26:44 +08:00
bugfix: deliver wrong object to each method in QMUIPagerAdapter
This commit is contained in:
@@ -67,14 +67,14 @@ public abstract class QMUIPagerAdapter extends PagerAdapter {
|
||||
/**
|
||||
* sometimes you may need to perform some operations on all items,
|
||||
* such as perform cleanup when the ViewPager is destroyed
|
||||
* notice: this not
|
||||
* once the action return true, then do not handle remain items
|
||||
*
|
||||
* @param action
|
||||
*/
|
||||
public void each(@NonNull Action action) {
|
||||
int size = mScrapItems.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
Object item = mScrapItems.indexOfValue(i);
|
||||
Object item = mScrapItems.valueAt(i);
|
||||
if (action.call(item)) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user