From 63c75d78f62f8f60a7899d0a4bd9138dd37b1e76 Mon Sep 17 00:00:00 2001 From: iPel Date: Wed, 15 Nov 2023 16:11:11 +0800 Subject: [PATCH] fix(android): fix `bounce` can't cancel the system effect --- .../views/hippylist/HippyRecyclerViewController.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerViewController.java b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerViewController.java index 7ffa109ef92..5005a3dfecb 100644 --- a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerViewController.java +++ b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerViewController.java @@ -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); } }