This repository was archived by the owner on Oct 15, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
library/src/com/handmark/pulltorefresh/library Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -388,9 +388,10 @@ private boolean isFirstItemVisible() {
388388 * now we'll just add one to account for it and rely on the inner
389389 * condition which checks getTop().
390390 */
391- if (mRefreshableView .getFirstVisiblePosition () <= 1 ) {
391+ if ((null == mIndicatorIvTop && mRefreshableView .getFirstVisiblePosition () == 0 ) ||
392+ (null != mIndicatorIvTop && mRefreshableView .getFirstVisiblePosition () <= 1 )) {
392393 final View firstVisibleChild = mRefreshableView .getChildAt (0 );
393- if (firstVisibleChild != null ) {
394+ if (firstVisibleChild != null && firstVisibleChild != mIndicatorIvTop ) {
394395 return firstVisibleChild .getTop () >= mRefreshableView .getTop ();
395396 }
396397 }
@@ -423,10 +424,11 @@ private boolean isLastItemVisible() {
423424 * account for it and rely on the inner condition which checks
424425 * getBottom().
425426 */
426- if (lastVisiblePosition >= lastItemPosition - 1 ) {
427+ if ((null == mIndicatorIvBottom && lastVisiblePosition == lastItemPosition ) ||
428+ (null != mIndicatorIvBottom && lastVisiblePosition >= lastItemPosition - 1 )) {
427429 final int childIndex = lastVisiblePosition - mRefreshableView .getFirstVisiblePosition ();
428430 final View lastVisibleChild = mRefreshableView .getChildAt (childIndex );
429- if (lastVisibleChild != null ) {
431+ if (lastVisibleChild != null && lastVisibleChild != mIndicatorIvBottom ) {
430432 return lastVisibleChild .getBottom () <= mRefreshableView .getBottom ();
431433 }
432434 }
You can’t perform that action at this time.
0 commit comments