You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/12/22 10:51:27 UTC

[GitHub] [incubator-weex] dufangyu1990 opened a new issue #3317: [Android]scroll组件-在页面打开的时候,会触发scrollEnd事件,ios则不会,

dufangyu1990 opened a new issue #3317:
URL: https://github.com/apache/incubator-weex/issues/3317


   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()是否可以注释掉或者是出于什么考虑这样设计


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org