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

下拉松手后回弹有时无法回到初始位置,导致下拉动作没有完整完成,影响下一次下拉 #239

Open
start141 opened this issue Jun 3, 2016 · 7 comments

Comments

@start141
Copy link

start141 commented Jun 3, 2016

这是正常回弹后回到初始位置的截图

qq20160603-0 2x 3

这是回弹未回到初始位置时的截图(为了方便展现问题,我把背景设置成了红色)

qq20160603-0 2x 4

 
 
当出现下拉松手后回弹最终未停留在初始位置时,就会导致一个完整的下拉动作未完成,
进一步导致用户尝试再一次下拉时不会触发新的下拉加载事件(UI上表现为下拉松手后会立马回弹,并不会触发onUIRefreshBegin)。

通过打印Log发现此时onUIRefreshComplete之后没有回调onUIReset,Log如下:
qq20160603-0 2x
qq20160603-0 2x
qq20160603-0 2x 2

如果你想要快速复现此bug,可以加大headerView的高度,同时缩减回调时间。

start141 added a commit to start141/android-Ultra-Pull-To-Refresh that referenced this issue Jun 3, 2016
@start141 start141 changed the title 下拉松手后回弹有时无法回到初始位置,从而导致下拉动作没有完整完成 下拉松手后回弹有时无法回到初始位置,导致下拉动作没有完整完成,影响下一次下拉 Jun 3, 2016
@woody0518
Copy link

@liaohuqiu 我也发现这个问题 求解决

@sam-taozhishan
Copy link

@liaohuqiu 给Scroller加上Interpolator就会出现回不到初始位置的情况~这个要如何解决呢

@start141
Copy link
Author

@sam-taozhishan 你可以看下 #240

@sam-taozhishan
Copy link

@start141 好的,感谢

@wuyongx
Copy link

wuyongx commented Aug 15, 2016

也发现此bug

start141 added a commit to start141/android-Ultra-Pull-To-Refresh that referenced this issue Aug 23, 2016
@lxcfix
Copy link

lxcfix commented Jan 2, 2017

有解决方法吗?

@yiranshaxiao
Copy link

PtrFrameLayout.java 类里面下面这个变量初始化存在bug
解决:去掉||跟后面的

            boolean finish = !mScroller.computeScrollOffset() || mScroller.isFinished();

改为

            boolean finish = !mScroller.computeScrollOffset();

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

6 participants