fix scrollable false prevent scrollToPosition

This commit is contained in:
王劲鹏
2022-06-29 15:06:18 +08:00
committed by osborn
parent e6cce1b60f
commit 59788fd658
4 changed files with 132 additions and 0 deletions

View File

@@ -99,6 +99,30 @@ class SliderPanel extends Panel {
space: 10,
backgroundColor: Color.RED,
}),
hlayout([
text({
text: "Scrollable",
layoutConfig: {
widthSpec: LayoutSpec.FIT,
heightSpec: LayoutSpec.JUST,
},
textSize: 20,
textColor: Color.BLACK,
textAlignment: gravity().center(),
height: 50,
}),
switchView({
state: true,
onSwitch: (state) => {
pager.scrollable = state
},
}),
], {
layoutConfig: layoutConfig().most().configHeight(LayoutSpec.FIT),
gravity: gravity().center(),
space: 10,
backgroundColor: Color.RED,
}),
hlayout([
text({
text: "Bounces",