Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[Android]scroll组件-在页面打开的时候,会触发scrollEnd事件,ios则不会, #3317

Open
dufangyu1990 opened this issue Dec 22, 2020 · 0 comments
Labels

Comments

@dufangyu1990
Copy link

Android scroll组件-在页面打开的时候,会触发scrollEnd事件,ios则不会,看了下代码,在scrollview 初始化的时候init()方法里就用handler发送了一个消息
private void init() {
setWillNotDraw(false);
startScrollerTask();
setOverScrollMode(View.OVER_SCROLL_NEVER);
childHelper = new NestedScrollingChildHelper(this);
childHelper.setNestedScrollingEnabled(true);
}

public void startScrollerTask() {
if (mScrollerTask == null) {
mScrollerTask = new Handler(WXThread.secure(this));
}
mInitialPosition = getScrollY();
mScrollerTask.sendEmptyMessageDelayed(0, mCheckTime);
}
init中的startScrollerTask()是否可以注释掉或者是出于什么考虑这样设计

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

No branches or pull requests

1 participant