yuyakaido / CardStackView

📱Tinder like swipeable card view for Android
Apache License 2.0
2.37k stars 448 forks source link

optimize rewind anim start position #256

Closed yueban closed 5 years ago

yueban commented 5 years ago

the original code set the start position for rewind animation by update a scroller action in onSeekTargetStep, but it use setting.getDuration() as its duration. So, when it comes to onTargetFound which determine the final position the card will animate to, the card may not be at the startPosition at this moment.

Here I change the duration of scrolling to startPosition action to 1, to make sure the duration is short enough to make the card be at the startPosition when it comes to onTargetFound.

yuyakaido commented 5 years ago

@yueban Thank you for your contribution! I fixed this issue by deleting needless view removing that you mentioned in #251.