@Test public void testScenerio32() { setupBasic(10, 8, 1); add(9, 2); add(7, 39); up(0, 39); mv(36, 20); add(1, 48); mv(22, 98); mv(96, 29); up(36, 29); add(60, 36); add(127, 34); rm(142, 22); up(12, 69); up(116, 13); up(118, 19); mv(94, 69); up(98, 21); add(89, 18); rm(94, 70); up(71, 8); rm(54, 26); add(2, 20); mv(78, 84); mv(56, 2); mv(1, 79); rm(76, 7); rm(57, 12); rm(30, 27); add(24, 13); add(21, 5); rm(11, 27); rm(32, 1); up(0, 5); mv(14, 9); rm(15, 12); up(19, 1); rm(7, 1); mv(10, 4); up(4, 3); rm(16, 1); up(13, 5); up(2, 8); add(10, 19); add(15, 42); preProcess(); }
void preProcess() { mOpReorderer.reorderOps(mPendingUpdates); final int count = mPendingUpdates.size(); for (int i = 0; i < count; i++) { UpdateOp op = mPendingUpdates.get(i); switch (op.cmd) { case UpdateOp.ADD: applyAdd(op); break; case UpdateOp.REMOVE: applyRemove(op); break; case UpdateOp.UPDATE: applyUpdate(op); break; case UpdateOp.MOVE: applyMove(op); break; } if (mOnItemProcessedCallback != null) { mOnItemProcessedCallback.run(); } } mPendingUpdates.clear(); }
AdapterHelper implements OpReorderer.Callback { void preProcess() { mOpReorderer.reorderOps(mPendingUpdates); final int count = mPendingUpdates.size(); for (int i = 0; i < count; i++) { UpdateOp op = mPendingUpdates.get(i); switch (op.cmd) { case UpdateOp.ADD: applyAdd(op); break; case UpdateOp.REMOVE: applyRemove(op); break; case UpdateOp.UPDATE: applyUpdate(op); break; case UpdateOp.MOVE: applyMove(op); break; } if (mOnItemProcessedCallback != null) { mOnItemProcessedCallback.run(); } } mPendingUpdates.clear(); } }
AdapterHelper implements OpReorderer.Callback { void preProcess() { mOpReorderer.reorderOps(mPendingUpdates); final int count = mPendingUpdates.size(); for (int i = 0; i < count; i++) { UpdateOp op = mPendingUpdates.get(i); switch (op.cmd) { case UpdateOp.ADD: applyAdd(op); break; case UpdateOp.REMOVE: applyRemove(op); break; case UpdateOp.UPDATE: applyUpdate(op); break; case UpdateOp.MOVE: applyMove(op); break; } if (mOnItemProcessedCallback != null) { mOnItemProcessedCallback.run(); } } mPendingUpdates.clear(); } AdapterHelper(Callback callback);   AdapterHelper(Callback callback, boolean disableRecycler); }
AdapterHelper implements OpReorderer.Callback { void preProcess() { mOpReorderer.reorderOps(mPendingUpdates); final int count = mPendingUpdates.size(); for (int i = 0; i < count; i++) { UpdateOp op = mPendingUpdates.get(i); switch (op.cmd) { case UpdateOp.ADD: applyAdd(op); break; case UpdateOp.REMOVE: applyRemove(op); break; case UpdateOp.UPDATE: applyUpdate(op); break; case UpdateOp.MOVE: applyMove(op); break; } if (mOnItemProcessedCallback != null) { mOnItemProcessedCallback.run(); } } mPendingUpdates.clear(); } AdapterHelper(Callback callback);   AdapterHelper(Callback callback, boolean disableRecycler); int applyPendingUpdatesToPosition(int position); @Override UpdateOp obtainUpdateOp(int cmd, int positionStart, int itemCount, Object payload); @Override void recycleUpdateOp(UpdateOp op); }
AdapterHelper implements OpReorderer.Callback { void preProcess() { mOpReorderer.reorderOps(mPendingUpdates); final int count = mPendingUpdates.size(); for (int i = 0; i < count; i++) { UpdateOp op = mPendingUpdates.get(i); switch (op.cmd) { case UpdateOp.ADD: applyAdd(op); break; case UpdateOp.REMOVE: applyRemove(op); break; case UpdateOp.UPDATE: applyUpdate(op); break; case UpdateOp.MOVE: applyMove(op); break; } if (mOnItemProcessedCallback != null) { mOnItemProcessedCallback.run(); } } mPendingUpdates.clear(); } AdapterHelper(Callback callback);   AdapterHelper(Callback callback, boolean disableRecycler); int applyPendingUpdatesToPosition(int position); @Override UpdateOp obtainUpdateOp(int cmd, int positionStart, int itemCount, Object payload); @Override void recycleUpdateOp(UpdateOp op);  }