Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

滑动的时候有时会一次切换两张卡片 #16

Open
alphacat2018 opened this issue Dec 22, 2016 · 1 comment
Open

滑动的时候有时会一次切换两张卡片 #16

alphacat2018 opened this issue Dec 22, 2016 · 1 comment

Comments

@alphacat2018
Copy link
Contributor

alphacat2018 commented Dec 22, 2016

先轻轻滑一下,然后在卡片复位之前再快速把卡片划出屏幕,就会出现连续两张卡片被删除的情况。Debug了一下,发现是因为onSelected方法里添加的Listener在卡片复位的时候也会被触发,也就是说会连续触发两次onAnimationEnd里的删除代码。所以我想是不是应该在每次ACTION_DOWN的时候把复位的动画cancel掉?而且cancel动画的做法还可以同时解决另一个问题:在卡片复位过程中按住卡片的话,会出现一瞬间的闪烁,这个问题也可以同时解决掉。

@xiepeijie
Copy link
Owner

@OYYMING 不错,谢谢分享,你不凡提下 pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants