You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/11/09 07:10:14 UTC

[47/50] [abbrv] incubator-weex git commit: when header view has parent, remove it from parent

when header view has parent, remove it from parent


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

Branch: refs/heads/master
Commit: db0ae56dc8729fa3750fd9446c688e87a8183cdc
Parents: 84e7675
Author: jianbai.gbj <ji...@alibaba-inc.com>
Authored: Tue Nov 7 14:24:44 2017 +0800
Committer: jianbai.gbj <ji...@alibaba-inc.com>
Committed: Tue Nov 7 14:24:44 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/com/taobao/weex/ui/component/list/WXCell.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/db0ae56d/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
index 925da65..cf3de07 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
@@ -177,6 +177,9 @@ public class WXCell extends WidgetContainer<WXFrameLayout> {
             if(mHeadView.getVisibility() != View.VISIBLE){
                 mHeadView.setVisibility(View.VISIBLE);
             }
+            if(mHeadView.getParent() != null){
+                ((ViewGroup)mHeadView.getParent()).removeView(mHeadView);
+            }
             getHostView().removeView(mTempStickyView);
             getHostView().addView(mHeadView);
             mHeadView.setTranslationX(0);