iOS: fix case when parent is fit,child is most, align to android

This commit is contained in:
pengfei.zhou
2021-05-07 18:11:54 +08:00
committed by osborn
parent f43406dc4a
commit d8412f3a96
2 changed files with 54 additions and 13 deletions

View File

@@ -17,6 +17,50 @@ class LayoutTest extends Panel {
textAlignment: gravity().center(),
height: 50,
}),
stack(
[
stack(
[
text({
text: "This is a stack content xxxxx",
textSize: 20,
textColor: Color.WHITE,
}),
],
{
layoutConfig: layoutConfig().most(),
backgroundColor: Color.BLUE
}
),
stack(
[
text({
text: "This is a stack content 000000000",
textSize: 20,
textColor: Color.WHITE,
}),
],
{
layoutConfig: layoutConfig().most(),
backgroundColor: Color.YELLOW,
alpha: 0.1
}
),
text({
text: "This is a stack content",
textSize: 20,
textColor: Color.WHITE,
}),
],
{
layoutConfig: {
widthSpec: LayoutSpec.FIT,
heightSpec: LayoutSpec.FIT,
},
backgroundColor: Color.RED
}),
stack(
[
stack(
@@ -49,7 +93,7 @@ class LayoutTest extends Panel {
}
),
text({
text: "This is a stack content",
text: "This is a vlayout content",
textSize: 20,
textColor: Color.WHITE,
}),