Skip to content

Commit

Permalink
Отладил работу стдвига, по длинному списку
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachilin Ivan committed Feb 25, 2019
1 parent 615c6b9 commit d14fbbb
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,7 @@ public void onAnimationStart(Animator animation) {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
final int recoverAnimSize = mRecoverAnimations.size();
for (int i = recoverAnimSize - 1; i >= 0; i--) {
if (mRecoverAnimations.get(i).mViewHolder == mPreOpened) {
mRecoverAnimations.remove(i);
break;
}
}
//mRecoverAnimations.clear();
mRecoverAnimations.clear();
}
});

Expand Down Expand Up @@ -548,7 +541,7 @@ public void onScrollStateChanged(RecyclerView recyclerView, int newState) {

private void setupCallbacks() {
ViewConfiguration vc = ViewConfiguration.get(mRecyclerView.getContext());
mSlop = vc.getScaledTouchSlop() / 2;
mSlop = vc.getScaledTouchSlop();
mRecyclerView.addItemDecoration(this);
mRecyclerView.addOnItemTouchListener(mOnItemTouchListener);
mRecyclerView.addOnChildAttachStateChangeListener(this);
Expand Down Expand Up @@ -697,7 +690,7 @@ public void onAnimationEnd(Animator animation) {
// wait until remove animation is complete.
mPendingCleanup.add(prevSelected.itemView);
mPreOpened = prevSelected;
//mIsPendingCleanup = true;
mIsPendingCleanup = true;
if (swipeDir > 0) {
// Animation might be ended by other animators during a layout.
// We defer callback to avoid editing adapter during a layout.
Expand Down

0 comments on commit d14fbbb

Please sign in to comment.