hudomju / android-swipe-to-dismiss-undo

Android swipe-to-dismiss-undo library and sample code
MIT License
240 stars 82 forks source link

Jumps and lags when using mSwipingSlop #39

Open AnatoliyS opened 8 years ago

AnatoliyS commented 8 years ago

When swiping container from negative translation to positive (or vice-versa, important that it should cross 0-translation point), it often lags and jumps a little bit in other than swipe's direction.

During such movement only ACTION_MOVE is processed.

In the code

mRowContainer.getCurrentSwipingView().setTranslationX(deltaX - mSwipingSlop);

mSwipingSlop is used for some reason. If I do following

mRowContainer.getCurrentSwipingView().setTranslationX(deltaX);

no such jumps appear.

For what reason mSwipingSlop is used here? What about this lags and jumps?