Skip to content

Commit

Permalink
fix(android): fix overScrollEnabled can't cancel the system effect
Browse files Browse the repository at this point in the history
  • Loading branch information
iPel committed Nov 10, 2023
1 parent b62ca93 commit 6d3fe55
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,13 @@ 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);
HippyRecyclerView<?> recyclerView = viewWrapper.getRecyclerView();
if (recyclerView != null) {
if (flag) {
recyclerView.setOverScrollMode(View.OVER_SCROLL_ALWAYS);
} else {
recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
}
}
setBounces(viewWrapper, flag);
}
Expand Down

0 comments on commit 6d3fe55

Please sign in to comment.