complex demo

This commit is contained in:
王劲鹏 2021-03-01 20:26:41 +08:00 committed by osborn
parent a0fb9a4666
commit 20150cbf9c

View File

@ -4,20 +4,65 @@ import { Group, Panel, text, gravity, Color, LayoutSpec, vlayout, hlayout, scrol
class LayoutDemo extends Panel { class LayoutDemo extends Panel {
build(rootView: Group) { build(rootView: Group) {
hlayout([ hlayout([
stack([], { vlayout([
stack([], {
width: 100,
height: 100,
backgroundColor: Color.RED
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.GREEN
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.BLUE
})
], {
width: 100, width: 100,
height: 100, height: 300,
backgroundColor: Color.RED
}), }),
stack([], { vlayout([
stack([], {
width: 100,
height: 100,
backgroundColor: Color.GREEN
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.BLUE
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.RED
})
], {
width: 100, width: 100,
height: 100, height: 300,
backgroundColor: Color.GREEN
}), }),
stack([], { vlayout([
stack([], {
width: 100,
height: 100,
backgroundColor: Color.BLUE
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.RED
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.GREEN
})
], {
width: 100, width: 100,
height: 100, height: 300,
backgroundColor: Color.BLUE
}) })
], { ], {
width: 300, width: 300,