Skip to content

Commit 901c0d0

Browse files
committed
itemIsObscuredByHeader() equality fix
1 parent 3bb8893 commit 901c0d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/main/java/com/timehop/stickyheadersrecyclerview/HeaderPositionCalculator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ private boolean itemIsObscuredByHeader(RecyclerView parent, View item, View head
229229
if (orientation == LinearLayoutManager.VERTICAL) {
230230
int itemTop = item.getTop() - layoutParams.topMargin;
231231
int headerBottom = getListTop(parent) + header.getBottom() + mTempRect1.bottom + mTempRect1.top;
232-
if (itemTop > headerBottom) {
232+
if (itemTop >= headerBottom) {
233233
return false;
234234
}
235235
} else {
236236
int itemLeft = item.getLeft() - layoutParams.leftMargin;
237237
int headerRight = getListLeft(parent) + header.getRight() + mTempRect1.right + mTempRect1.left;
238-
if (itemLeft > headerRight) {
238+
if (itemLeft >= headerRight) {
239239
return false;
240240
}
241241
}

0 commit comments

Comments
 (0)