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