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 2019/08/28 06:38:40 UTC

[GitHub] [incubator-weex] tianbaojun opened a new issue #2855: Android BounceRecyclerView onRefreshingComplete调用后,某个cell会消失

tianbaojun opened a new issue #2855: Android BounceRecyclerView  onRefreshingComplete调用后,某个cell会消失
URL: https://github.com/apache/incubator-weex/issues/2855
 
 
   ## Describe the bug
   weex写的稍微复杂的一个列表,android list组件进行下拉刷新后,某些item(cell)消失了。
   
   ## Environment
   Device: 华为p9  (所有手机都可以重现,但不是必现)
   OS: android 8.0(所有手机都可以重现,但不是必现)
   Version 0.18
   Build from source  yes
   
   ## Expected behavior
   刷新之后【服务商家】不应该消失
   
   ## Screenshots
   下拉刷新前
   ![下拉刷新前](https://user-images.githubusercontent.com/14233443/63830821-b37ff000-c99f-11e9-9a99-1008aec703c3.jpg)
   下拉刷新后
   ![下拉刷新后](https://user-images.githubusercontent.com/14233443/63830865-ceeafb00-c99f-11e9-9e7d-1017875996c2.jpg)
   可以看到服务商家这个模块是丢失的。
   ## Additional context
   为了避免数据渲染导致的问题,我做了如下尝试。
   WXSwipeLayout的startRefresh方法中,我取消了 onRefreshListener.onRefresh();的调用。但是【服务商家】item依然会消失。
    private void startRefresh(int headerViewHeight) {
       mRefreshing = true;
       ValueAnimator animator = ValueAnimator.ofFloat(headerViewHeight, refreshViewHeight);
       animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
         @Override
         public void onAnimationUpdate(ValueAnimator animation) {
           LayoutParams lp = (LayoutParams) headerView.getLayoutParams();
           lp.height = (int) ((Float) animation.getAnimatedValue()).floatValue();
           headerView.setLayoutParams(lp);
           moveTargetView(lp.height);
         }
       });
       animator.addListener(new WXRefreshAnimatorListener() {
         @Override
         public void onAnimationEnd(Animator animation) {
           headerView.startAnimation();
           //TODO updateLoadText
           if (onRefreshListener != null) {
             postDelayed(new Runnable() {
               @Override
               public void run() {
                 finishPullRefresh();
                 if(getParent() instanceof BaseBounceView) {
                   ((BaseBounceView) getParent()).onRefreshingComplete();
                 }
               }
             },2000);
           }
         }
       });
       animator.setDuration(300);
       animator.start();
     }

----------------------------------------------------------------
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


With regards,
Apache Git Services