diff --git a/library/src/main/java/com/aspsine/swipetoloadlayout/SwipeToLoadLayout.java b/library/src/main/java/com/aspsine/swipetoloadlayout/SwipeToLoadLayout.java index 9b5f85d..6073fd3 100644 --- a/library/src/main/java/com/aspsine/swipetoloadlayout/SwipeToLoadLayout.java +++ b/library/src/main/java/com/aspsine/swipetoloadlayout/SwipeToLoadLayout.java @@ -1068,6 +1068,14 @@ private void layoutChildren() { } final int targetRight = targetLeft + targetView.getMeasuredWidth(); final int targetBottom = targetTop + targetView.getMeasuredHeight(); + //make the scrollable targetView show the loaded items + if (STATUS.isLoadingMore(mStatus)) { + int scroll = targetTop - targetView.getTop(); + if (scroll != 0 && canChildScrollUp()) { + targetView.scrollBy(0, scroll); + } + } + targetView.layout(targetLeft, targetTop, targetRight, targetBottom); }