Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[android] onloadmore of scroller is not executed when loadmoreoffset is not set #2802

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
* Upgrade targetsdk & compilesdk to 28

## Main Bugfix
* [android] onloadmore of scroller is not executed when loadmoreoffset is not set #2802
Original file line number Diff line number Diff line change
Expand Up @@ -974,14 +974,14 @@ protected void onLoadMore(WXScrollView scrollView, int x, int y) {
try {
String offset = getAttrs().getLoadMoreOffset();
if (TextUtils.isEmpty(offset)) {
return;
offset = "0";
}
int offsetInt = (int)WXViewUtils.getRealPxByWidth(Float.parseFloat(offset), getInstance().getInstanceViewPortWidth());

int contentH = scrollView.getChildAt(0).getHeight();
int scrollerH = scrollView.getHeight();
int offScreenY = contentH - y - scrollerH;
if (offScreenY < offsetInt) {
if (offScreenY <= offsetInt) {
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.d("[WXScroller-onScroll] offScreenY :" + offScreenY);
}
Expand Down