Skip to content
This repository was archived by the owner on Oct 15, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,10 @@ private boolean isFirstItemVisible() {
* now we'll just add one to account for it and rely on the inner
* condition which checks getTop().
*/
if (mRefreshableView.getFirstVisiblePosition() <= 1) {
if ((null == mIndicatorIvTop && mRefreshableView.getFirstVisiblePosition() == 0) ||
(null != mIndicatorIvTop && mRefreshableView.getFirstVisiblePosition() <= 1)) {
final View firstVisibleChild = mRefreshableView.getChildAt(0);
if (firstVisibleChild != null) {
if (firstVisibleChild != null && firstVisibleChild != mIndicatorIvTop) {
return firstVisibleChild.getTop() >= mRefreshableView.getTop();
}
}
Expand Down Expand Up @@ -423,10 +424,11 @@ private boolean isLastItemVisible() {
* account for it and rely on the inner condition which checks
* getBottom().
*/
if (lastVisiblePosition >= lastItemPosition - 1) {
if ((null == mIndicatorIvBottom && lastVisiblePosition == lastItemPosition) ||
(null != mIndicatorIvBottom && lastVisiblePosition >= lastItemPosition - 1)) {
final int childIndex = lastVisiblePosition - mRefreshableView.getFirstVisiblePosition();
final View lastVisibleChild = mRefreshableView.getChildAt(childIndex);
if (lastVisibleChild != null) {
if (lastVisibleChild != null && lastVisibleChild != mIndicatorIvBottom) {
return lastVisibleChild.getBottom() <= mRefreshableView.getBottom();
}
}
Expand Down