From 750b4325d7350bbce43d79f01b63afff794712b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Sj=C3=B6lander?= Date: Sat, 21 Jun 2014 19:00:00 -0700 Subject: [PATCH] Make sure to clear sticky header when at top --- .../stickylistheaders/StickyListHeadersListView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java b/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java index 58743cb3..16570ca7 100644 --- a/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java +++ b/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java @@ -308,7 +308,7 @@ private void updateOrClearHeader(int firstVisiblePosition) { final boolean doesListHaveChildren = mList.getChildCount() != 0; final boolean isFirstViewBelowTop = doesListHaveChildren && mList.getFirstVisiblePosition() == 0 - && mList.getChildAt(0).getTop() > stickyHeaderTop(); + && mList.getChildAt(0).getTop() >= stickyHeaderTop(); final boolean isHeaderPositionOutsideAdapterRange = headerPosition > adapterCount - 1 || headerPosition < 0; if (!doesListHaveChildren || isHeaderPositionOutsideAdapterRange || isFirstViewBelowTop) {