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

自动刷新autoRefresh在部分机型上动画有问题 #31

Open
xjd33328 opened this issue Sep 29, 2017 · 0 comments
Open

自动刷新autoRefresh在部分机型上动画有问题 #31

xjd33328 opened this issue Sep 29, 2017 · 0 comments

Comments

@xjd33328
Copy link

xjd33328 commented Sep 29, 2017

autoRefresh在三星机型上动画正常,不过运行在miui系统上存在下拉动画卡顿的问题,分析到的主要出在AutoRefreshAndLoadTask中,具体代码块:
@OverRide
protected String doInBackground(Integer... params) {
while (pullDownY < 4 / 3 * refreshDist) {
pullDownY += MOVE_SPEED;
publishProgress(pullDownY);
try {
Thread.sleep(params[0]);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
return null;
}
这里的 Thread.sleep(params[0]);用来防止下拉动画在一瞬间加载完成,传入值是20,但是在miui机型上,我将该值修改为1,自动下拉动画仍存在一卡一卡的卡顿问题,而在其他系统上,该值如果为1,动画在进入的一瞬间就已经加载完成

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

1 participant