Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): fix bounce can't cancel the system effect #3608

Merged
merged 1 commit into from
Nov 16, 2023
Merged
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 @@ -223,18 +223,14 @@ public void setSuspendViewListener(final HRW viewWrapper, int open) {

@HippyControllerProps(name = "overScrollEnabled", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
public void setOverScrollEnable(HRW viewWrapper, boolean flag) {
if (flag) {
viewWrapper.setOverScrollMode(View.OVER_SCROLL_ALWAYS);
} else {
viewWrapper.setOverScrollMode(View.OVER_SCROLL_NEVER);
}
setBounces(viewWrapper, flag);
}

@HippyControllerProps(name = OVER_PULL, defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = true)
public void setBounces(HRW viewWrapper, boolean flag) {
HippyRecyclerView recyclerView = viewWrapper.getRecyclerView();
HippyRecyclerView<?> recyclerView = viewWrapper.getRecyclerView();
if (recyclerView != null) {
recyclerView.setOverScrollMode(flag ? View.OVER_SCROLL_ALWAYS : View.OVER_SCROLL_NEVER);
recyclerView.setEnableOverPull(flag);
}
}
Expand Down
Loading