From 3f596f6062b59adf9ee2109cc66aa0c302c46616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Tue, 4 Apr 2023 20:53:29 +0800 Subject: [PATCH] Android: NestedSlider support slidePosition --- .../main/java/pub/doric/shader/slider/NestedSliderNode.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doric-android/doric/src/main/java/pub/doric/shader/slider/NestedSliderNode.java b/doric-android/doric/src/main/java/pub/doric/shader/slider/NestedSliderNode.java index 556e08f6..68edf992 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/slider/NestedSliderNode.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/slider/NestedSliderNode.java @@ -138,6 +138,12 @@ public class NestedSliderNode extends GroupNode implements ViewPager. case "onPageSlided": this.onPageSlidedFuncId = prop.asString().toString(); break; + case "slidePosition": + if (prop.isNumber()) { + int position = prop.asNumber().toInt(); + mView.setCurrentItem(position, false); + } + break; default: super.blend(view, name, prop); break;