[ https://issues.apache.org/jira/browse/WEEX-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16586888#comment-16586888 ]
ASF GitHub Bot commented on WEEX-580: ------------------------------------- YorkShen closed pull request #1455: [WEEX-580][Android]view key is not unique, RecycleList data repeat render not right, URL: https://github.com/apache/incubator-weex/pull/1455 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java index b9a414fd6d..37351670ed 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java @@ -2174,15 +2174,15 @@ public void setWaste(boolean waste) { } - /** component key id in native, - * differ with ref, ref + position + /** component uniquie key id in native for recycle-list, + * should be unique for every native component differ with ref * */ public String getViewTreeKey(){ if(mViewTreeKey == null){ if(getParent() == null){ - mViewTreeKey = getRef(); + mViewTreeKey = hashCode() + "_" + getRef(); }else{ - mViewTreeKey = getRef() + "_" + getParent().indexOf(this); + mViewTreeKey = hashCode() + "_" + getRef() + "_" + getParent().indexOf(this); } } return mViewTreeKey; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > view key is not unique, RecycleList data repeat render not right, > -------------------------------------------------------------------- > > Key: WEEX-580 > URL: https://issues.apache.org/jira/browse/WEEX-580 > Project: Weex > Issue Type: Bug > Reporter: codefurture > Assignee: codefurture > Priority: Minor > > view key is not unique,RecycleList data repeat render not right, change > viewTreeKey to unique -- This message was sent by Atlassian JIRA (v7.6.3#76005)