From 91acb52878b93fc675970626a10b44cb6b6a78d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E8=B4=9E=E5=BA=86?= Date: Fri, 15 Aug 2025 18:23:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[ui=E5=AF=B9=E6=AF=94]=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?UiComponentColumnMatchParent53=E6=9D=A1=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=89=B91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 覃贞庆 --- .../UiComponentColumnMatchParent26.ets | 185 +++++++++++++++++ .../UiComponentColumnMatchParent27.ets | 185 +++++++++++++++++ .../UiComponentColumnMatchParent28.ets | 183 +++++++++++++++++ .../UiComponentColumnMatchParent29.ets | 186 ++++++++++++++++++ .../UiComponentColumnMatchParent30.ets | 185 +++++++++++++++++ .../UiComponentColumnMatchParent31.ets | 186 ++++++++++++++++++ .../UiComponentColumnMatchParent32.ets | 186 ++++++++++++++++++ .../UiComponentColumnMatchParent33.ets | 185 +++++++++++++++++ .../UiComponentColumnMatchParent34.ets | 186 ++++++++++++++++++ .../UiComponentColumnMatchParent35.ets | 186 ++++++++++++++++++ 10 files changed, 1853 insertions(+) create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent26.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent27.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent28.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent29.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent30.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent31.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent32.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent33.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent34.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent35.ets diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent26.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent26.ets new file mode 100644 index 00000000..61422774 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent26.ets @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent26 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .width(50) + .height(100) + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent27.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent27.ets new file mode 100644 index 00000000..ae68a725 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent27.ets @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent27 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .width(50) + .height(LayoutPolicy.matchParent) + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent28.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent28.ets new file mode 100644 index 00000000..68441ab4 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent28.ets @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent28 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent29.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent29.ets new file mode 100644 index 00000000..f4ca72df --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent29.ets @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent29 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(50) + .height(100) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent30.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent30.ets new file mode 100644 index 00000000..6496a69e --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent30.ets @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent30 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent31.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent31.ets new file mode 100644 index 00000000..be747af1 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent31.ets @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent31 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(LayoutPolicy.matchParent) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent32.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent32.ets new file mode 100644 index 00000000..b3f98d5d --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent32.ets @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent32 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(50) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent33.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent33.ets new file mode 100644 index 00000000..b3edc2f9 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent33.ets @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent33 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(100) + .width(50) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent34.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent34.ets new file mode 100644 index 00000000..189ad247 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent34.ets @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent34 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(50) + .width(100) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(LayoutPolicy.matchParent) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent35.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent35.ets new file mode 100644 index 00000000..90de5a10 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent35.ets @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent35 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(100) + .width(50) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(100) + .width(50) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file -- Gitee From 16abfa3d637e1d29a3b4885791f8b49b1c47221c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E8=B4=9E=E5=BA=86?= Date: Fri, 15 Aug 2025 18:24:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[ui=E5=AF=B9=E6=AF=94]=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?UiComponentColumnMatchParent53=E6=9D=A1=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=89=B92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 覃贞庆 --- .../UiComponentColumnMatchParent36.ets | 184 +++++++++++++++++ .../UiComponentColumnMatchParent37.ets | 186 ++++++++++++++++++ .../UiComponentColumnMatchParent38.ets | 184 +++++++++++++++++ .../UiComponentColumnMatchParent39.ets | 184 +++++++++++++++++ .../UiComponentColumnMatchParent40.ets | 183 +++++++++++++++++ .../UiComponentColumnMatchParent41.ets | 184 +++++++++++++++++ .../UiComponentColumnMatchParent42.ets | 184 +++++++++++++++++ .../UiComponentColumnMatchParent43.ets | 184 +++++++++++++++++ .../UiComponentColumnMatchParent44.ets | 182 +++++++++++++++++ .../UiComponentColumnMatchParent45.ets | 184 +++++++++++++++++ 10 files changed, 1839 insertions(+) create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent36.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent37.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent38.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent39.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent40.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent41.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent42.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent43.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent44.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent45.ets diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent36.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent36.ets new file mode 100644 index 00000000..fa1c7eec --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent36.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent36 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(100) + .width(50) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent37.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent37.ets new file mode 100644 index 00000000..7fa7da5a --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent37.ets @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent37 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(100) + .width(50) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(50) + .height(LayoutPolicy.matchParent) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent38.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent38.ets new file mode 100644 index 00000000..d82db731 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent38.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent38 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(LayoutPolicy.matchParent) + .height(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .width(200) + .height(300) + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent39.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent39.ets new file mode 100644 index 00000000..45b07327 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent39.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent39 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(LayoutPolicy.matchParent) + .height(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(50) + .height(100) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent40.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent40.ets new file mode 100644 index 00000000..6e2e7513 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent40.ets @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent40 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(50) + .height(100) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(LayoutPolicy.matchParent) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent41.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent41.ets new file mode 100644 index 00000000..3d0c61f0 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent41.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent41 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(50) + .height(100) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(LayoutPolicy.matchParent) + .height(LayoutPolicy.matchParent) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent42.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent42.ets new file mode 100644 index 00000000..b7ec6232 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent42.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent42 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(50) + .height(100) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(50) + .height(100) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent43.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent43.ets new file mode 100644 index 00000000..8e687e3f --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent43.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent43 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(50) + .height(100) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(50) + .height(LayoutPolicy.matchParent) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent44.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent44.ets new file mode 100644 index 00000000..029b4ac5 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent44.ets @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent44 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(50) + .height(100) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent45.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent45.ets new file mode 100644 index 00000000..e1c4e533 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent45.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent45 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(50) + .height(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(50) + .height(100) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file -- Gitee From 01e793caa2c70cf0f3e327e8738af4faf9c3b87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E8=B4=9E=E5=BA=86?= Date: Fri, 15 Aug 2025 18:24:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[ui=E5=AF=B9=E6=AF=94]=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?UiComponentColumnMatchParent53=E6=9D=A1=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=89=B93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 覃贞庆 --- .../UiComponentColumnMatchParent46.ets | 182 ++++++++++++++++++ .../UiComponentColumnMatchParent47.ets | 180 +++++++++++++++++ .../UiComponentColumnMatchParent48.ets | 182 ++++++++++++++++++ .../UiComponentColumnMatchParent49.ets | 182 ++++++++++++++++++ .../UiComponentColumnMatchParent50.ets | 181 +++++++++++++++++ .../UiComponentColumnMatchParent51.ets | 182 ++++++++++++++++++ .../UiComponentColumnMatchParent52.ets | 182 ++++++++++++++++++ .../UiComponentColumnMatchParent53.ets | 180 +++++++++++++++++ 8 files changed, 1451 insertions(+) create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent46.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent47.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent48.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent49.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent50.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent51.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent52.ets create mode 100644 sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent53.ets diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent46.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent46.ets new file mode 100644 index 00000000..14746f49 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent46.ets @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent46 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(50) + .height(100) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent47.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent47.ets new file mode 100644 index 00000000..6576b90a --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent47.ets @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent47 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent48.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent48.ets new file mode 100644 index 00000000..dda6dc1f --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent48.ets @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent48 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .width(LayoutPolicy.matchParent) + .height(LayoutPolicy.matchParent) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent49.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent49.ets new file mode 100644 index 00000000..e3f0a7d1 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent49.ets @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent49 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .width(LayoutPolicy.matchParent) + .height(LayoutPolicy.matchParent) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent50.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent50.ets new file mode 100644 index 00000000..9fe5bf10 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent50.ets @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent50 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent51.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent51.ets new file mode 100644 index 00000000..4d04cf50 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent51.ets @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent51 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(50) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent52.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent52.ets new file mode 100644 index 00000000..6c54e379 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent52.ets @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent52 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Row() + { + Text('Row2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + Column() + { + Text('Column2') + .width('80%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Blue) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + + Row() + { + Row() + { + Text('Row3') + .width('40%') + .height('40%') + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:0, + left:0, + right:0 + }) + .borderWidth(1) + } + Column() + { + Text('Column3') + .height(30) + .width("40%") + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(4) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(20) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:0, + right:0 + }) + .borderWidth(1) + } + } + .backgroundColor(Color.Green) + .alignItems(VerticalAlign.Top) + .border({ width: 1 }) + .height(LayoutPolicy.matchParent) + .width(50) + } + .border({ + width:3 , + color:Color.Black} + )} +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent53.ets b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent53.ets new file mode 100644 index 00000000..bcfaf819 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_02/entry/src/ohosTest/ets/testability/pages/UiComponentColumnMatchParent/UiComponentColumnMatchParent53.ets @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UiComponentColumnMatchParent53 { + @State Mywidth: number=40 + @State Myheight: number=40 + @State text : string = "change height and width" + + build() { + Column() + { + Column() + { + Text('Column1') + .width('80%') + .height(55) + .padding(3) + .ellipsisMode(EllipsisMode.END) + .fontSize(7) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(10) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 5, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + Button(this.text) + .controlSize(ControlSize.NORMAL) + .id('UiComponentColumnMatchParent53') + .type(ButtonType.Capsule) + .width(50) + .borderRadius(5) + .height(20) + .fontWeight(FontWeight.Bolder) + .backgroundColor(0x317aff) + .onClick(()=>{ + this.Mywidth+=10; + this.Myheight+=10; + }) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 2, + maxFontSize: 20, + font: { + size: 5, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .fontSize(2) + } + .backgroundColor(Color.Blue) + .width(100) + .height(100) + .flexShrink(2) + .alignItems(HorizontalAlign.Start) + .border({ width: 1 }) + + Column() + { + Text('Column2') + .width('80%') + .height(40) + .ellipsisMode(EllipsisMode.END) + .wordBreak(WordBreak.NORMAL) + .textCase(TextCase.Normal) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontSize(5) + .padding(1) + .fontWeight(FontWeight.Bolder) + .fontColor(0xCCCCCC) + .lineHeight(20) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 10, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + .backgroundColor(Color.Green) + .alignItems(HorizontalAlign.Start) + .width(100) + .height(100) + .flexShrink(2) + .border({ width: 1 }) + + Column() + { + Text('Column3') + .width('80%') + .height(40) + .fontSize(5) + .textCase(TextCase.Normal) + .padding(1) + .ellipsisMode(EllipsisMode.END) + .wordBreak(WordBreak.NORMAL) + .draggable(true) + .copyOption(CopyOptions.InApp) + .fontColor(0xCCCCCC) + .lineHeight(10) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .decoration({ + type: TextDecorationType.Underline, + color:Color.Black + }) + .textShadow({ + radius: 1, + color: Color.Black, + offsetX: 0, + offsetY: 0 + }) + .margin({ + top:6, + bottom:6, + left:6, + right:6 + }) + .borderWidth(1) + } + .flexShrink(2) + .backgroundColor(Color.Yellow) + .alignItems(HorizontalAlign.Start) + .width(LayoutPolicy.matchParent) + .height(LayoutPolicy.matchParent) + .border({ width: 1 }) + } + .width(100) + .height(200) + .border({ + width: 2 , + color:Color.Red} + )} +} \ No newline at end of file -- Gitee