Skip to content

Commit

Permalink
fix(android): fix bounce can't cancel the system effect
Browse files Browse the repository at this point in the history
  • Loading branch information
iPel authored and hippy-actions[bot] committed Nov 16, 2023
1 parent 5abd5ad commit 63c75d7
Showing 1 changed file with 2 additions and 6 deletions.
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

0 comments on commit 63c75d7

Please sign in to comment.