From 5ce93c7fdeaacf35c7adf5bdeaeacdc0bf474cc9 Mon Sep 17 00:00:00 2001 From: "jianbai.gbj" Date: Mon, 26 Feb 2018 20:30:55 +0800 Subject: [PATCH] [WEEX-222][android] Sticky header in waterfall is not sticky --- .../com/taobao/weex/ui/component/list/BasicListComponent.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java index 2ea3254962..b84941977f 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java @@ -601,6 +601,9 @@ public void onBeforeScroll(int dx, int dy) { if (pos <= firstVisiblePosition || (cell.getStickyOffset() > 0 && firstVisiblePosition < pos && pos <= lastVisiblePosition && top <= cell.getStickyOffset())) { beforeFirstVisibleItem = true; + if(pos > currentStickyPos) { + currentStickyPos = pos; + } }else{ removeOldSticky = true; }