Android: NestedSlider support slidePosition

This commit is contained in:
王劲鹏 2023-04-04 20:53:29 +08:00
parent 592bd3df53
commit 3f596f6062

View File

@ -138,6 +138,12 @@ public class NestedSliderNode extends GroupNode<ViewPager> implements ViewPager.
case "onPageSlided": case "onPageSlided":
this.onPageSlidedFuncId = prop.asString().toString(); this.onPageSlidedFuncId = prop.asString().toString();
break; break;
case "slidePosition":
if (prop.isNumber()) {
int position = prop.asNumber().toInt();
mView.setCurrentItem(position, false);
}
break;
default: default:
super.blend(view, name, prop); super.blend(view, name, prop);
break; break;