Skip to content

Commit

Permalink
Make sure to clear sticky header when at top
Browse files Browse the repository at this point in the history
  • Loading branch information
emilsjolander committed Jun 22, 2014
1 parent d56ba35 commit 750b432
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 750b432

Please sign in to comment.