You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/09/21 13:38:32 UTC

[05/50] [abbrv] incubator-weex git commit: performance improve hack

performance improve hack


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3dc6ac77
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3dc6ac77
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3dc6ac77

Branch: refs/heads/0.16-dev
Commit: 3dc6ac774e4418d57e87d7a8237bb27bb9e0ede3
Parents: 08515fe
Author: jianbai.gbj <ji...@alibaba-inc.com>
Authored: Thu Sep 14 11:56:15 2017 +0800
Committer: jianbai.gbj <ji...@alibaba-inc.com>
Committed: Thu Sep 14 11:56:15 2017 +0800

----------------------------------------------------------------------
 .../list/template/WXRecyclerTemplateList.java      | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3dc6ac77/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
index 04e2070..826b080 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
@@ -87,22 +87,8 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 /**
- * todo-list
- * 1、appear事件
- * 2、sticky事件
- * 3、多列测试
- * 5、for loop
  * weex template list supported
  * https://github.com/Hanks10100/weex-native-directive
- * demo address
- * http://dotwe.org/vue/ee9b5bbbe11629f565372595951670ec
- *
- * http://dotwe.org/vue/87b258b63599136999905a3e65c6c444
- *
- * http://dotwe.org/vue/94839a9b4e87c7c5464585f6a6c109ce
- *
- * http://dotwe.org/vue/0e549fb446458ecdc21e6115ea3a3c7b
- *
  * Created by jianbai.gbj on 2017/8/17.
  */
 @Component(lazyload = false)
@@ -204,6 +190,9 @@ public class WXRecyclerTemplateList extends WXVContainer<BounceRecyclerView> imp
         bounceRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
         bounceRecyclerView.getInnerView().clearOnScrollListeners();
         bounceRecyclerView.getInnerView().addOnScrollListener(mViewOnScrollListener);
+        if("true".equals(getDomObject().getAttrs().get("hasFixedSize"))){
+            bounceRecyclerView.getInnerView().setHasFixedSize(true);
+        }
         bounceRecyclerView.getInnerView().addOnScrollListener(new RecyclerView.OnScrollListener() {
             @Override
             public void onScrollStateChanged(RecyclerView recyclerView, int newState) {