提交 18185ffa 编写于 作者: Y yaocui

Merge branch 'master' of https://gitee.com/yaocui_moring/xts_acts

...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
"deliveryWithInstall": true, "deliveryWithInstall": true,
"installationFree": false, "installationFree": false,
"pages": "$profile:test_pages", "pages": "$profile:test_pages",
"metadata": [{ "metadata": [
"name": "ArkTSPartialUpdate", {
"value": "true" "name": "ArkTSPartialUpdate",
}], "value": "true"
}
],
"abilities": [ "abilities": [
{ {
"name": "TestAbility", "name": "TestAbility",
......
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
"deliveryWithInstall": true, "deliveryWithInstall": true,
"installationFree": false, "installationFree": false,
"pages": "$profile:test_pages", "pages": "$profile:test_pages",
"metadata": [{ "metadata": [
"name": "ArkTSPartialUpdate", {
"value": "true" "name": "ArkTSPartialUpdate",
}], "value": "true"
}
],
"abilities": [ "abilities": [
{ {
"name": "TestAbility", "name": "TestAbility",
......
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../common/MessageManager'; import { MessageManager, Callback } from './../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct Column_Space { struct Column_Space {
@State addSpace: number = 10 @State addSpace: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('Column_Space onPageShow'); console.info('Column_Space onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'addSpace') { if (message.name == 'addSpace') {
this.addSpace = message.value; this.addSpace = message.value;
} }
...@@ -34,9 +34,9 @@ struct Column_Space { ...@@ -34,9 +34,9 @@ struct Column_Space {
} }
build() { build() {
Column({space:this.addSpace}) { Column({space:this.addSpace}) {
Column(){Text('1')}.width(300).height(50).backgroundColor(0xF5DEB3).key('Column_Space_011') Column(){Text('1')}.width(300).height(50).backgroundColor(0xF5DEB3).key('Column_Space_011');
Column(){Text('2')}.width(300).height(100).backgroundColor(0xD2B48C).key('Column_Space_012') Column(){Text('2')}.width(300).height(100).backgroundColor(0xD2B48C).key('Column_Space_012');
Column(){Text('3')}.width(300).height(150).backgroundColor(0xF5DEB3).key('Column_Space_013') Column(){Text('3')}.width(300).height(150).backgroundColor(0xF5DEB3).key('Column_Space_013');
}.key('Column_Space_01').width(350).height(400).backgroundColor(0xAFEEEE) }.key('Column_Space_01').width(350).height(400).backgroundColor(0xAFEEEE)
} }
} }
...@@ -61,8 +61,8 @@ struct Flex_NoWrap_FlexMarPad_TextMarPad{ ...@@ -61,8 +61,8 @@ struct Flex_NoWrap_FlexMarPad_TextMarPad{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.NoWrap}){ Flex({ wrap:FlexWrap.NoWrap }){
Text('1').width(150).height(100).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) Text('1').width(150).height(100).backgroundColor(0xF5DEB3).margin(this.firstTextMargin)
.padding(this.firstTextPadding).key('NoWrap_FlexMarPad_TextPad1'); .padding(this.firstTextPadding).key('NoWrap_FlexMarPad_TextPad1');
Text('2').width(150).height(150).backgroundColor(0xD2B48C).margin(this.secondTextMargin) Text('2').width(150).height(150).backgroundColor(0xD2B48C).margin(this.secondTextMargin)
......
...@@ -26,7 +26,7 @@ struct Flex_NoWrap_FlexMar_TextMarPad{ ...@@ -26,7 +26,7 @@ struct Flex_NoWrap_FlexMar_TextMarPad{
messageManager:MessageManager = new MessageManager(); messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('Flex_NoWrap_FlexMar_TextMarPad onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
......
...@@ -57,8 +57,8 @@ struct Flex_NoWrap_FlexPad_TextMarPad{ ...@@ -57,8 +57,8 @@ struct Flex_NoWrap_FlexPad_TextMarPad{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.NoWrap}){ Flex({ wrap:FlexWrap.NoWrap }){
Text('1').width(150).height(100).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) Text('1').width(150).height(100).backgroundColor(0xF5DEB3).margin(this.firstTextMargin)
.padding(this.firstTextPadding).key('NoWrap_FlexPad_TextMarPad1'); .padding(this.firstTextPadding).key('NoWrap_FlexPad_TextMarPad1');
Text('2').width(150).height(150).backgroundColor(0xD2B48C).margin(this.secondTextMargin) Text('2').width(150).height(150).backgroundColor(0xD2B48C).margin(this.secondTextMargin)
......
...@@ -41,9 +41,8 @@ struct Flex_Wrap_DisplayPriority{ ...@@ -41,9 +41,8 @@ struct Flex_Wrap_DisplayPriority{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
// 子组件设置DisplayPriority Flex({ wrap:FlexWrap.Wrap }){
Flex({wrap:FlexWrap.Wrap}){
Text('1').width(150).height(100).backgroundColor(0xF5DEB3) Text('1').width(150).height(100).backgroundColor(0xF5DEB3)
.displayPriority(this.firstTextPriority).key('Wrap_DisplayPriority01'); .displayPriority(this.firstTextPriority).key('Wrap_DisplayPriority01');
Text('2').width(150).height(150).backgroundColor(0xD2B48C) Text('2').width(150).height(150).backgroundColor(0xD2B48C)
......
...@@ -61,8 +61,8 @@ struct Flex_Wrap_FlexMarPad_TextMarPad{ ...@@ -61,8 +61,8 @@ struct Flex_Wrap_FlexMarPad_TextMarPad{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap}){ Flex({ wrap:FlexWrap.Wrap }){
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin)
.padding(this.firstTextPadding).key('Wrap_FlexMarPad_TextPad1'); .padding(this.firstTextPadding).key('Wrap_FlexMarPad_TextPad1');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin) Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin)
......
...@@ -57,8 +57,8 @@ struct Flex_Wrap_FlexMar_TextMarPad{ ...@@ -57,8 +57,8 @@ struct Flex_Wrap_FlexMar_TextMarPad{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap}){ Flex({ wrap:FlexWrap.Wrap }){
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin)
.padding(this.firstTextPadding).key('Wrap_FlexMar_TextPad1'); .padding(this.firstTextPadding).key('Wrap_FlexMar_TextPad1');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin) Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin)
......
...@@ -57,8 +57,8 @@ struct Flex_Wrap_FlexPad_TextMarPad{ ...@@ -57,8 +57,8 @@ struct Flex_Wrap_FlexPad_TextMarPad{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap}){ Flex({ wrap:FlexWrap.Wrap }){
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin)
.padding(this.firstTextPadding).key('Wrap_FlexPad_TextMarPad1'); .padding(this.firstTextPadding).key('Wrap_FlexPad_TextMarPad1');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin) Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin)
......
...@@ -37,8 +37,8 @@ struct Flex_Wrap_FlexSize{ ...@@ -37,8 +37,8 @@ struct Flex_Wrap_FlexSize{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:10}){ Column({ space:10 }){
Flex({wrap:FlexWrap.Wrap, direction: FlexDirection.Row}){ Flex({ wrap:FlexWrap.Wrap, direction: FlexDirection.Row }){
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_flexSize_Text1'); Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_flexSize_Text1');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_flexSize_Text2'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_flexSize_Text2');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_flexSize_Text3'); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_flexSize_Text3');
......
...@@ -41,8 +41,8 @@ struct Flex_Wrap_layoutWeight{ ...@@ -41,8 +41,8 @@ struct Flex_Wrap_layoutWeight{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap}){ Flex({ wrap:FlexWrap.Wrap }){
Text('1').width(150).height(100).backgroundColor(0xF5DEB3) Text('1').width(150).height(100).backgroundColor(0xF5DEB3)
.layoutWeight(this.firstTextLayoutWeight).key('Wrap_LayoutWeight01'); .layoutWeight(this.firstTextLayoutWeight).key('Wrap_LayoutWeight01');
Text('2').width(150).height(150).backgroundColor(0xD2B48C) Text('2').width(150).height(150).backgroundColor(0xD2B48C)
......
...@@ -37,8 +37,8 @@ struct Flex_Wrap_FlexPad_TextMarPad{ ...@@ -37,8 +37,8 @@ struct Flex_Wrap_FlexPad_TextMarPad{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, direction: FlexDirection.Row}){ Flex({ wrap:FlexWrap.Wrap, direction: FlexDirection.Row }){
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_flex_pad1'); Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_flex_pad1');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_flex_pad2'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_flex_pad2');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_flex_pad3'); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_flex_pad3');
......
...@@ -33,8 +33,8 @@ struct Flex_Wrap_Position{ ...@@ -33,8 +33,8 @@ struct Flex_Wrap_Position{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap}){ Flex({ wrap:FlexWrap.Wrap }){
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_Position01').position(this.testPosition); Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_Position01').position(this.testPosition);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_Position02'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_Position02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_Position03'); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_Position03');
......
...@@ -33,8 +33,8 @@ struct Flex_Wrap_TextSize{ ...@@ -33,8 +33,8 @@ struct Flex_Wrap_TextSize{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:10}){ Column({ space:10 }){
Flex({wrap:FlexWrap.Wrap, direction: FlexDirection.Row}){ Flex({ wrap:FlexWrap.Wrap, direction: FlexDirection.Row }){
Text('1').width(this.testWidth).height(50).backgroundColor(0xF5DEB3).key('Wrap_flex_TextSize1'); Text('1').width(this.testWidth).height(50).backgroundColor(0xF5DEB3).key('Wrap_flex_TextSize1');
Text('2').width(this.testWidth).height(100).backgroundColor(0xD2B48C).key('Wrap_flex_TextSize2'); Text('2').width(this.testWidth).height(100).backgroundColor(0xD2B48C).key('Wrap_flex_TextSize2');
Text('3').width(this.testWidth).height(150).backgroundColor(0xF5DEB3).key('Wrap_flex_TextSize3'); Text('3').width(this.testWidth).height(150).backgroundColor(0xF5DEB3).key('Wrap_flex_TextSize3');
......
...@@ -47,8 +47,8 @@ struct Flex_Wrap_Visibility{ ...@@ -47,8 +47,8 @@ struct Flex_Wrap_Visibility{
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap}){ Flex({ wrap:FlexWrap.Wrap }){
Text('1').width(this.firstTextWidth).height(100).backgroundColor(0xF5DEB3) Text('1').width(this.firstTextWidth).height(100).backgroundColor(0xF5DEB3)
.visibility(this.testVisibility).key('Wrap_Text_Visibility1'); .visibility(this.testVisibility).key('Wrap_Text_Visibility1');
Text('2').width(this.secondTextWidth).height(150).backgroundColor(0xD2B48C).key('Wrap_Text_Visibility2'); Text('2').width(this.secondTextWidth).height(150).backgroundColor(0xD2B48C).key('Wrap_Text_Visibility2');
......
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParent {
@State testWidth: number = 150
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParent Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParent page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'width') {
this.testWidth = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParent page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest8').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(this.testWidth).height(50).backgroundColor(0xF5DEB3).key('WrapReverseTest22')
Text('2').width(this.testWidth).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest23')
Text('3').width(this.testWidth).height(150).backgroundColor(0xffa500).key('WrapReverseTest24')
}
.key('FlexWrapReverseTest8')
.height(300)
.width(500)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParentChildDisplayPriority {
@State testHeight: number = 150
@State testWidth: number = 450
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParentChildDisplayPriority Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParentChildDisplayPriority page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.testHeight = message.value;
}
if (message.name == 'width') {
this.testWidth = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParentChildDisplayPriority page build done called');
}
build() {
Column() {
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(250).height(100).backgroundColor(0xF5DEB3).displayPriority(3).key('WrapReverseTest70')
Text('2').width(150).height(150).backgroundColor(0xD2B48C).displayPriority(2).key('WrapReverseTest71')
Text('3').width(150).height(200).backgroundColor(0xffa500).displayPriority(1).key('WrapReverseTest72')
}
.key('FlexWrapReverseTest24')
.height(this.testHeight)
.width(this.testWidth)
.backgroundColor(0xAFEEEE)
}.width('100%').height('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParentChildLayoutWeight {
@State testHeight: number = 150
@State testWidth: number = 300
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParentChildLayoutWeight Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParentChildLayoutWeight page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.testHeight = message.value;
}
if (message.name == 'width') {
this.testWidth = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParentChildLayoutWeight page build done called');
}
build() {
Column() {
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(100).backgroundColor(0xF5DEB3).layoutWeight(2).key('WrapReverseTest67')
Text('2').width(100).height(150).backgroundColor(0xD2B48C).layoutWeight(1).key('WrapReverseTest68')
Text('3').width(100).height(200).backgroundColor(0xffa500).layoutWeight(1).key('WrapReverseTest69')
}
.key('FlexWrapReverseTest23')
.height(this.testHeight)
.width(this.testWidth)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParentChildPosition {
@State testHeight: number = 150
@State testWidth: number = 450
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParentChildPosition Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParentChildPosition page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.testHeight = message.value;
}
if (message.name == 'width') {
this.testWidth = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParentChildPosition page build done called');
}
build() {
Column() {
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('WrapReverseTest64').position({x:20,y:40})
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest65')
Text('3').width(150).height(150).backgroundColor(0xffa500).key('WrapReverseTest66')
}
.key('FlexWrapReverseTest22')
.height(this.testHeight)
.width(this.testWidth)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParentChildVisibility {
@State test1Width: number = 150
@State test2Width: number = 300
@State testVisibility: number = Visibility.Visible
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParentChildVisibility Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParentChildVisibility page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'test1Width') {
this.test1Width = message.value;
}
if (message.name == 'test2Width') {
this.test2Width = message.value;
}
if (message.name == 'visibility') {
this.testVisibility = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParentChildVisibility page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest19').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(this.test1Width).height(50).backgroundColor(0xF5DEB3).key('WrapReverseTest55').visibility(this.testVisibility)
Text('2').width(this.test2Width).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest56')
Text('3').width(this.test2Width).height(150).backgroundColor(0xffa500).key('WrapReverseTest57')
}
.key('FlexWrapReverseTest19')
.height(300)
.width(500)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParentMarPad {
@State testPadding: number = 0
@State testMargin: number = 0
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParentMarPad Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParentMarPad page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.testPadding = message.value;
}
if (message.name == 'margin') {
this.testMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParentMarPad page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest16').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).padding(this.testPadding).margin(this.testMargin).key('WrapReverseTest46')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest47')
Text('3').width(150).height(150).backgroundColor(0xffa500).key('WrapReverseTest48')
}
.key('FlexWrapReverseTest16')
.height(300)
.width(500)
.padding(50)
.margin(20)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParentMargin {
@State testPadding: number = 0
@State testMargin: number = 0
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParentMargin Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParentMargin page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.testPadding = message.value;
}
if (message.name == 'margin') {
this.testMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParentMargin page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest13').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).padding(this.testPadding).margin(this.testMargin).key('WrapReverseTest37')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest38')
Text('3').width(150).height(150).backgroundColor(0xffa500).key('WrapReverseTest39')
}
.key('FlexWrapReverseTest13')
.height(300)
.width(500)
.margin(20)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_fixedParentPadding {
@State testPadding: number = 10
@State testMargin: number = 0
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_fixedParentPadding Page"
onPageShow() {
console.info('FlexWrapReverse_fixedParentPadding page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.testPadding = message.value;
}
if (message.name == 'margin') {
this.testMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_fixedParentPadding page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest10').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).padding(this.testPadding).margin(this.testMargin).key('WrapReverseTest28')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest29')
Text('3').width(150).height(150).backgroundColor(0xffa500).key('WrapReverseTest30')
}
.key('FlexWrapReverseTest10')
.height(300)
.width(500)
.padding(50)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_notFixedParent {
@State testHeight: number = 150
@State testWidth: number = 450
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_notFixedParent Page"
onPageShow() {
console.info('FlexWrapReverse_notFixedParent page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.testHeight = message.value;
}
if (message.name == 'width') {
this.testWidth = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_notFixedParent page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest1').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('WrapReverseTest1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest2')
Text('3').width(150).height(150).backgroundColor(0xffa500).key('WrapReverseTest3')
}
.key('FlexWrapReverseTest1')
.height(this.testHeight)
.width(this.testWidth)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_notFixedParentMargin {
@State testHeight: number = 150
@State testWidth: number = 450
@State testPadding: number = 0
@State testMargin: number = 10
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_notFixedParentMargin Page"
onPageShow() {
console.info('FlexWrapReverse_notFixedParentMargin page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.testHeight = message.value;
}
if (message.name == 'width') {
this.testWidth = message.value;
}
if (message.name == 'padding') {
this.testPadding = message.value;
}
if (message.name == 'margin') {
this.testMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_notFixedParentMargin page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest6').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('WrapReverseTest16')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest17')
Text('3').width(150).height(150).backgroundColor(0xffa500).key('WrapReverseTest18')
}
.key('FlexWrapReverseTest6')
.height(this.testHeight)
.width(this.testWidth)
.padding(this.testPadding)
.margin(this.testMargin)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/**
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct FlexWrapReverse_notFixedParentPaddind {
@State testHeight: number = 150
@State testWidth: number = 450
@State testPadding: number = 10
messageManager:MessageManager = new MessageManager()
private content: string = "FlexWrapReverse_notFixedParentPaddind Page"
onPageShow() {
console.info('FlexWrapReverse_notFixedParentPaddind page show called');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.testHeight = message.value;
}
if (message.name == 'width') {
this.testWidth = message.value;
}
if (message.name == 'padding') {
this.testPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
onBuildDone() {
console.info('FlexWrapReverse_notFixedParentPaddind page build done called');
}
build() {
Column() {
Text('Wrap:WrapReverseTest4').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ direction: FlexDirection.Row, wrap: FlexWrap.WrapReverse }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('WrapReverseTest10')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('WrapReverseTest11')
Text('3').width(150).height(150).backgroundColor(0xffa500).key('WrapReverseTest12')
}
.key('FlexWrapReverseTest4')
.height(this.testHeight)
.width(this.testWidth)
.padding(this.testPadding)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
\ No newline at end of file
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContentFlex_Center {
@State flexHeight: number = 300;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.flexHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContentFlex_Center').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexCenter_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexCenter_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexCenter_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexCenter_flex001_4')
}
.key('AlignContentFlexCenter_flex001')
.width(400)
.height(this.flexHeight)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_Center_FlexP_Fixed_Margin {
@State textMargin: number = 5;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') {
this.textMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_Center_FlexP_Fixed_Margin_1')
.margin(this.textMargin)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_Center_FlexP_Fixed_Margin_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContent_Center_FlexP_Fixed_Margin_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContent_Center_FlexP_Fixed_Margin_4')
}
.key('AlignContent_Center_FlexP_Fixed_Margin_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}
.width('100%')
.alignItems(HorizontalAlign.Start)
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContent_Center_FlexP_Fixed_Offset {
alignContent: number
build() {
Column() {
Text('AlignContent_Center_FlexP_Fixed_Offset').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_Center_FlexP_Fixed_Offset_1')
.offset({ x: 15, y: 30 })
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_Center_FlexP_Fixed_Offset_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_Center_FlexP_Fixed_Offset_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_Center_FlexP_Fixed_Offset_4')
}
.key('AlignContent_Center_FlexP_Fixed_Offset_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_Center_FlexP_Fixed_Visibility {
@State textVisibility : number = Visibility.Visible;
messageManager:MessageManager = new MessageManager();
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'visibility') {
this.textVisibility = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_Center_FlexP_Fixed_Visibility').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_Center_FlexP_Fixed_Visibility_1')
.visibility(this.textVisibility)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_Center_FlexP_Fixed_Visibility_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContent_Center_FlexP_Fixed_Visibility_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContent_Center_FlexP_Fixed_Visibility_4')
}
.key('AlignContent_Center_FlexP_Fixed_Visibility_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_Center_FlexP_fixed {
@State textHeight: number = 50;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.textHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_Center_FlexP_fixed').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(this.textHeight).backgroundColor(0xF5DEB3).key('AlignContentFlexCenterP_fixed_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexCenterP_fixed_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContentFlexCenterP_fixed_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContentFlexCenterP_fixed_4')
}
.key('AlignContentFlexCenterP_fixed_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContent_FlexAlign_Center_Margin {
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexCenterMargin_flex_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexCenterMargin_flex_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexCenterMargin_flex_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexCenterMargin_flex_4')
}
.key('AlignContentFlexCenterMargin_flex')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.margin(15)
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.key('AlignContentFlexCenterMargin_Column')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_Center_Margin_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Column(){
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3)
.key('AlignContentFlexCenterMargin&padding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C)
.key('AlignContentFlexCenterMargin&padding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C)
.key('AlignContentFlexCenterMargin&padding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3)
.key('AlignContentFlexCenterMargin&padding_flex001_4')
}
.key('AlignContentFlexCenterMargin&padding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.margin(10)
.padding(this.flexPadding)
}.key('AlignContentFlexCenterMargin&padding_Column_1')
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.key('AlignContentFlexCenterMargin&padding_Column')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_Center_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_FlexAlign_Center_padding').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexCenterPadding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexCenterPadding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexCenterPadding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexCenterPadding_flex001_4')
}
.key('AlignContentFlexCenterPadding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.padding(this.flexPadding)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContentFlex_End {
@State flexHeight: number = 300;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.flexHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContentFlex_End').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexEnd_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexEnd_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexEnd_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexEnd_flex001_4')
}
.key('AlignContentFlexEnd_flex001')
.width(400)
.height(this.flexHeight)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_End_FlexP_Fixed_Margin {
@State textMargin: number = 5;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') {
this.textMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_End_FlexP_Fixed_Margin_1')
.margin(this.textMargin)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_End_FlexP_Fixed_Margin_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContent_End_FlexP_Fixed_Margin_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContent_End_FlexP_Fixed_Margin_4')
}
.key('AlignContent_End_FlexP_Fixed_Margin_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}
.width('100%')
.alignItems(HorizontalAlign.Start)
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContent_End_FlexP_Fixed_Offset {
alignContent: number
build() {
Column() {
Text('AlignContent_End_FlexP_Fixed_Offset').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_End_FlexP_Fixed_Offset_1')
.offset({ x: 15, y: 30 })
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_End_FlexP_Fixed_Offset_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_End_FlexP_Fixed_Offset_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_End_FlexP_Fixed_Offset_4')
}
.key('AlignContent_End_FlexP_Fixed_Offset_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_End_FlexP_Fixed_Visibility {
@State textVisibility : number = Visibility.Visible;
messageManager:MessageManager = new MessageManager();
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'visibility') {
this.textVisibility = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_End_FlexP_Fixed_Visibility').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_End_FlexP_Fixed_Visibility_1')
.visibility(this.textVisibility)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_End_FlexP_Fixed_Visibility_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContent_End_FlexP_Fixed_Visibility_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContent_End_FlexP_Fixed_Visibility_4')
}
.key('AlignContent_End_FlexP_Fixed_Visibility_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_End_FlexP_fixed {
@State textHeight: number = 50;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.textHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_End_FlexP_fixed').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(this.textHeight).backgroundColor(0xF5DEB3).key('AlignContentFlexEndP_fixed_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexEndP_fixed_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContentFlexEndP_fixed_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContentFlexEndP_fixed_4')
}
.key('AlignContentFlexEndP_fixed_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContent_FlexAlign_End_Margin {
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexEndMargin_flex_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexEndMargin_flex_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexEndMargin_flex_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexEndMargin_flex_4')
}
.key('AlignContentFlexEndMargin_flex')
.size({ width: 400, height: 360 })
.backgroundColor(0xAFEEEE)
.margin(15)
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.key('AlignContentFlexEndMargin_Column')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_End_Margin_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Column(){
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3)
.key('AlignContentFlexEndMargin&padding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C)
.key('AlignContentFlexEndMargin&padding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C)
.key('AlignContentFlexEndMargin&padding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3)
.key('AlignContentFlexEndMargin&padding_flex001_4')
}
.key('AlignContentFlexEndMargin&padding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.margin(10)
.padding(this.flexPadding)
}.key('AlignContentFlexEndMargin&padding_Column_1')
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.key('AlignContentFlexEndMargin&padding_Column')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_End_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_FlexAlign_End_padding').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.End,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexEndPadding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexEndPadding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexEndPadding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexEndPadding_flex001_4')
}
.key('AlignContentFlexEndPadding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.padding(this.flexPadding)
}.width('100%')
}
}
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_04{ struct FlexAlign_SpaceAround_FlexMar{
@State testMargin: number = 0 @State testMargin: number = 0;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager()
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('FlexAlign_SpaceAround_FlexMar onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') { if (message.name == 'margin') {
this.testMargin = message.value; this.testMargin = message.value;
} }
...@@ -33,12 +33,12 @@ struct FlexAlignContent_SpaceAround_04{ ...@@ -33,12 +33,12 @@ struct FlexAlignContent_SpaceAround_04{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_03{ struct FlexAlign_SpaceAround_FlexMarPad{
@State testPadding: number = 0; @State testPadding: number = 0;
@State testMargin: number = 0; @State testMargin: number = 0;
messageManager:MessageManager = new MessageManager(); messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('FlexAlign_SpaceAround_FlexMarPad onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') { if (message.name == 'padding') {
this.testPadding = message.value; this.testPadding = message.value;
} }
...@@ -36,12 +36,12 @@ struct FlexAlignContent_SpaceAround_03{ ...@@ -36,12 +36,12 @@ struct FlexAlignContent_SpaceAround_03{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad02');
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad03') Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad03');
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad04') Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad04');
} }
.width(200) .width(200)
.height(540) .height(540)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_02{ struct FlexAlign_SpaceAround_FlexPad{
@State testPadding: number = 0 @State testPadding: number = 0;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_02 onPageShow'); console.info('FlexAlign_SpaceAround_FlexPad onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') { if (message.name == 'padding') {
this.testPadding = message.value; this.testPadding = message.value;
} }
...@@ -33,12 +33,12 @@ struct FlexAlignContent_SpaceAround_02{ ...@@ -33,12 +33,12 @@ struct FlexAlignContent_SpaceAround_02{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad02');
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad03') Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad03');
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad04') Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad04');
} }
.width(200) .width(200)
.height(540) .height(540)
......
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_01{ struct FlexAlign_SpaceAround_FlexSize{
@State testWidth: number = 400 @State testWidth: number = 400;
@State testHeight: number = 100 @State testHeight: number = 100;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('FlexAlign_SpaceAround_FlexSize onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'width') { if (message.name == 'width') {
this.testWidth = message.value; this.testWidth = message.value;
} }
...@@ -37,12 +37,12 @@ struct FlexAlignContent_SpaceAround_01{ ...@@ -37,12 +37,12 @@ struct FlexAlignContent_SpaceAround_01{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize04');
} }
.width(this.testWidth) .width(this.testWidth)
.height(this.testHeight) .height(this.testHeight)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_04{ struct FlexAlign_SpaceAround_TextMar{
@State testMargin: number = 0 @State testMargin: number = 0
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager()
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('FlexAlign_SpaceAround_TextMar onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') { if (message.name == 'margin') {
this.testMargin = message.value; this.testMargin = message.value;
} }
...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_04{ ...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_04{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.margin(this.testMargin) .margin(this.testMargin)
.key('AlignContent_SpaceAround_TextMar01') .key('AlignContent_SpaceAround_TextMar01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextMar03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextMar03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_05{ struct FlexAlign_SpaceAround_TextOffset{
@State testOffset: object = {x:0, y:0} @State testOffset: object = { x:0, y:0 };
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('FlexAlign_SpaceAround_TextOffset onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'offset') { if (message.name == 'offset') {
this.testOffset = message.value; this.testOffset = message.value;
} }
...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_05{ ...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_05{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.offset(this.testOffset) .offset(this.testOffset)
.key('AlignContent_SpaceAround_TextOffset01') .key('AlignContent_SpaceAround_TextOffset01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextOffset03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextOffset03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_06{ struct FlexAlign_SpaceAround_TextSize{
@State testHeight: number = 50 @State testHeight: number = 50;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('FlexAlign_SpaceAround_TextSize onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') { if (message.name == 'height') {
this.testHeight = message.value; this.testHeight = message.value;
} }
...@@ -33,16 +33,16 @@ struct FlexAlignContent_SpaceAround_06{ ...@@ -33,16 +33,16 @@ struct FlexAlignContent_SpaceAround_06{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1') Text('1')
.width(150) .width(150)
.height(this.testHeight) .height(this.testHeight)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.key('AlignContent_SpaceAround_TextSize01') .key('AlignContent_SpaceAround_TextSize01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextSize03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextSize03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceAround_07{ struct AlignContent_SpaceAround_TextVisibility{
@State testVisibility: number = Visibility.Visible @State testVisibility: number = Visibility.Visible;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceAround_01 onPageShow'); console.info('AlignContent_SpaceAround_TextVisibility onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'visibility') { if (message.name == 'visibility') {
this.testVisibility = message.value; this.testVisibility = message.value;
} }
...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_07{ ...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_07{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.key('AlignContent_SpaceAround_TextVisibility01') .key('AlignContent_SpaceAround_TextVisibility01')
.visibility(this.testVisibility) .visibility(this.testVisibility);
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextVisibility03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextVisibility03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_04{ struct FlexAlign_SpaceBetween_FlexMar{
@State testMargin: number = 0 @State testMargin: number = 0;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_FlexMar onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') { if (message.name == 'margin') {
this.testMargin = message.value; this.testMargin = message.value;
} }
...@@ -35,10 +35,10 @@ struct FlexAlignContent_SpaceBetween_04{ ...@@ -35,10 +35,10 @@ struct FlexAlignContent_SpaceBetween_04{
build(){ build(){
Column({space:30}){ Column({space:30}){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar02');
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar03') Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar03');
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar04') Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar04');
} }
.width(200) .width(200)
.height(540) .height(540)
......
...@@ -15,17 +15,17 @@ ...@@ -15,17 +15,17 @@
import {MessageManager,Callback} from '../../../../common/MessageManager'; import {MessageManager,Callback} from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_03{ struct FlexAlign_SpaceBetween_FlexMarPad{
@State testPadding: number = 0; @State testPadding: number = 0;
@State testMargin: number = 0; @State testMargin: number = 0;
messageManager:MessageManager = new MessageManager(); messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_FlexMarPad onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') { if (message.name == 'padding') {
this.testPadding = message.value; this.testPadding = message.value;
} }
...@@ -36,12 +36,12 @@ struct FlexAlignContent_SpaceBetween_03{ ...@@ -36,12 +36,12 @@ struct FlexAlignContent_SpaceBetween_03{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad02');
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad03') Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad03');
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad04') Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad04');
} }
.width(200) .width(200)
.height(540) .height(540)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_02{ struct FlexAlign_SpaceBetween_FlexPad{
@State testPadding: number = 0 @State testPadding: number = 0;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_FlexPad onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') { if (message.name == 'padding') {
this.testPadding = message.value; this.testPadding = message.value;
} }
...@@ -34,11 +34,11 @@ struct FlexAlignContent_SpaceBetween_02{ ...@@ -34,11 +34,11 @@ struct FlexAlignContent_SpaceBetween_02{
} }
build(){ build(){
Column({space:30}){ Column({space:30}){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad02');
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad03') Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad03');
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad04') Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad04');
} }
.width(200) .width(200)
.height(540) .height(540)
......
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_01{ struct FlexAlign_SpaceBetween_FlexSize{
@State testWidth: number = 400 @State testWidth: number = 400
@State testHeight: number = 100 @State testHeight: number = 100
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager()
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_FlexSize onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'width') { if (message.name == 'width') {
this.testWidth = message.value; this.testWidth = message.value;
} }
...@@ -37,12 +37,12 @@ struct FlexAlignContent_SpaceBetween_01{ ...@@ -37,12 +37,12 @@ struct FlexAlignContent_SpaceBetween_01{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){
Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize01') Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize04');
} }
.width(this.testWidth) .width(this.testWidth)
.height(this.testHeight) .height(this.testHeight)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_04{ struct FlexAlign_SpaceBetween_TextMar{
@State testMargin: number = 0 @State testMargin: number = 0;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_TextMar onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') { if (message.name == 'margin') {
this.testMargin = message.value; this.testMargin = message.value;
} }
...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_04{ ...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_04{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.margin(this.testMargin) .margin(this.testMargin)
.key('AlignContent_SpaceBetween_TextMar01') .key('AlignContent_SpaceBetween_TextMar01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextMar03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextMar03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_05{ struct FlexAlign_SpaceBetween_TextOffset{
@State testOffset: object = {x:0, y:0} @State testOffset: object = {x:0, y:0}
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager()
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_TextOffset onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'offset') { if (message.name == 'offset') {
this.testOffset = message.value; this.testOffset = message.value;
} }
...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_05{ ...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_05{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.offset(this.testOffset) .offset(this.testOffset)
.key('AlignContent_SpaceBetween_TextOffset01') .key('AlignContent_SpaceBetween_TextOffset01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextOffset03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextOffset03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_06{ struct FlexAlign_SpaceBetween_TextSize{
@State testHeight: number = 50 @State testHeight: number = 50;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_TextSize onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') { if (message.name == 'height') {
this.testHeight = message.value; this.testHeight = message.value;
} }
...@@ -33,16 +33,16 @@ struct FlexAlignContent_SpaceBetween_06{ ...@@ -33,16 +33,16 @@ struct FlexAlignContent_SpaceBetween_06{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){
Text('1') Text('1')
.width(150) .width(150)
.height(this.testHeight) .height(this.testHeight)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.key('AlignContent_SpaceBetween_TextSize01') .key('AlignContent_SpaceBetween_TextSize01');
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextSize03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextSize03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexAlignContent_SpaceBetween_07{ struct FlexAlign_SpaceBetween_TextVisibility{
@State testVisibility: number = Visibility.Visible @State testVisibility: number = Visibility.Visible;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); console.info('FlexAlign_SpaceBetween_TextVisibility onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'visibility') { if (message.name == 'visibility') {
this.testVisibility = message.value; this.testVisibility = message.value;
} }
...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_07{ ...@@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_07{
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
build(){ build(){
Column({space:30}){ Column({ space:30 }){
Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xD2B48C) .backgroundColor(0xD2B48C)
.key('AlignContent_SpaceBetween_TextVisibility01') .key('AlignContent_SpaceBetween_TextVisibility01')
.visibility(this.testVisibility) .visibility(this.testVisibility);
Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility02') Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility02');
Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextVisibility03') Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextVisibility03');
Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility04') Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility04');
} }
.width(200) .width(200)
.height(400) .height(400)
......
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContentFlex {
@State flexHeight: number = 300;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.flexHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContentFlex').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexSpaceEvenly_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexSpaceEvenly_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexSpaceEvenly_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexSpaceEvenly_flex001_4')
}
.key('AlignContentFlexSpaceEvenly_flex001')
.width(400)
.height(this.flexHeight)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContentFlexP_Fixed_Margin {
@State textMargin: number = 5;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') {
this.textMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexP_fixed_Margin_flex001_1')
.margin(this.textMargin)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexP_fixed_Margin_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContentFlexP_fixed_Margin_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContentFlexP_fixed_Margin_flex001_4')
}
.key('AlignContentFlexP_fixed_Margin_flex001')
.size({ width: 500, height: 400 })
.backgroundColor(0xAFEEEE)
}
.width('100%')
.alignItems(HorizontalAlign.Start)
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContentFlexP_fixed_Offset {
alignContent: number
build() {
Column() {
Text('AlignContentFlexP_fixed_Offset').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexP_fixed_Offset_flex_1')
.offset({ x: 15, y: 30 })
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexP_fixed_Offset_flex_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexP_fixed_Offset_flex_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexP_fixed_Offset_flex_4')
}
.key('AlignContentFlexP_fixed_Offset_flex')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContentFlexP_Fixed_Visibility {
@State textVisibility: number = Visibility.Visible;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'visibility') {
this.textVisibility = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContentFlexP_Fixed_Visibility').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexP_Fixed_Visibility_1')
.visibility(this.textVisibility)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexP_Fixed_Visibility_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContentFlexP_Fixed_Visibility_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContentFlexP_Fixed_Visibility_4')
}
.key('AlignContentFlexP_Fixed_Visibility_flex')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContentFlexP_fixed {
@State textHeight: number = 50;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.textHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContentFlexP_fixed').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(this.textHeight).backgroundColor(0xF5DEB3).key('AlignContentFlexP_fixed_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexP_fixed_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContentFlexP_fixed_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContentFlexP_fixed_4')
}
.key('AlignContentFlexSpaceEvenlyP_fixed_flex')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContent_FlexAlign_SpaceEvenly_Margin {
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexSpaceEvenlyMargin_flex_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexSpaceEvenlyMargin_flex_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexSpaceEvenlyMargin_flex_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexSpaceEvenlyMargin_flex_4')
}
.key('AlignContentFlexSpaceEvenlyMargin_flex')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.margin(15)
}
.width('100%')
.key('SpaceEvenly_Margin_Column')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_SpaceEvenly_Margin_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Column(){
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3)
.key('AlignContentFlexSpaceEvenlyMargin&padding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C)
.key('AlignContentFlexSpaceEvenlyMargin&padding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C)
.key('AlignContentFlexSpaceEvenlyMargin&padding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3)
.key('AlignContentFlexSpaceEvenlyMargin&padding_flex001_4')
}
.key('AlignContentFlexSpaceEvenlyMargin&padding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.margin(10)
.padding(this.flexPadding)
}
.key('AlignContentFlexSpaceEvenlyMargin&paddingColumn_1')
.alignItems(HorizontalAlign.Start)
}
.width('100%')
.key('AlignContentFlexSpaceEvenlyMargin&paddingColumn')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_SpaceEvenly_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_FlexAlign_SpaceEvenly_padding').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.SpaceEvenly,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexSpaceEvenlyPadding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexSpaceEvenlyPadding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexSpaceEvenlyPadding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexSpaceEvenlyPadding_flex001_4')
}
.key('AlignContentFlexSpaceEvenlyPadding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.padding(this.flexPadding)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContentFlex_Start {
@State flexHeight: number = 300;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.flexHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContentFlex_Start').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlex_Start_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlex_Start_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlex_Start_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlex_Start_flex001_4')
}
.key('AlignContentFlex_Start_flex001')
.width(400)
.height(this.flexHeight)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContent_FlexAlign_Start_Margin {
alignContent: number
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexStartMargin_flex_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexStartMargin_flex_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexStartMargin_flex_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexStartMargin_flex_4')
}
.key('AlignContentFlexStartMargin_flex')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.margin(15)
}
.width('100%')
.key('AlignContentFlexStartMargin_Column')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_Start_Margin_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Column(){
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3)
.key('AlignContentFlexStartMargin&padding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C)
.key('AlignContentFlexStartMargin&padding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C)
.key('AlignContentFlexStartMargin&padding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3)
.key('AlignContentFlexStartMargin&padding_flex001_4')
}
.key('AlignContentFlexStartMargin&padding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.margin(10)
.padding(this.flexPadding)
}.key('AlignContentFlexStartMargin&padding_Column_1')
}
.width('100%')
.key('AlignContentFlexStartMargin&padding_Column')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_FlexAlign_Start_padding {
@State flexPadding: number = 10;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') {
this.flexPadding = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_FlexAlign_Start_padding').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContentFlexStartPadding_flex001_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexStartPadding_flex001_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContentFlexStartPadding_flex001_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContentFlexStartPadding_flex001_4')
}
.key('AlignContentFlexStartPadding_flex001')
.width(400)
.height(360)
.backgroundColor(0xAFEEEE)
.padding(this.flexPadding)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_Start_FlexP_Fixed_Margin {
@State textMargin: number = 5;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') {
this.textMargin = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_Start_FlexP_Fixed_Margin_1')
.margin(this.textMargin)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_Start_FlexP_Fixed_Margin_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContent_Start_FlexP_Fixed_Margin_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContent_Start_FlexP_Fixed_Margin_4')
}
.key('AlignContent_Start_FlexP_Fixed_Margin_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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 AlignContent_Start_FlexP_Fixed_Offset {
alignContent: number
build() {
Column() {
Text('AlignContent_Start_FlexP_Fixed_Offset').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_Start_FlexP_Fixed_Offset_1')
.offset({ x: 15, y: 30 })
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_Start_FlexP_Fixed_Offset_2')
Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_Start_FlexP_Fixed_Offset_3')
Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_Start_FlexP_Fixed_Offset_4')
}
.key('AlignContent_Start_FlexP_Fixed_Offset_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_Start_FlexP_Fixed_Visibility {
@State textVisibility : number = Visibility.Visible;
messageManager:MessageManager = new MessageManager();
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'visibility') {
this.textVisibility = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_Start_FlexP_Fixed_Visibility').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('AlignContent_Start_FlexP_Fixed_Visibility_1')
.visibility(this.textVisibility)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContent_Start_FlexP_Fixed_Visibility_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContent_Start_FlexP_Fixed_Visibility_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContent_Start_FlexP_Fixed_Visibility_4')
}
.key('AlignContent_Start_FlexP_Fixed_Visibility_flex001')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
/*
* Copyright (c) 2023 iSoftStone Information Technology (Group) 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.
*/
import { MessageManager,Callback } from '../../../../common/MessageManager';
@Entry
@Component
struct AlignContent_Start_FlexP_fixed {
@State textHeight: number = 50;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignContentFlex onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'height') {
this.textHeight = message.value;
}
}
this.messageManager.registerCallback(callback);
}
build() {
Column() {
Text('AlignContent_Start_FlexP_fixed').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({
direction: FlexDirection.Row,
wrap: FlexWrap.Wrap,
alignContent: FlexAlign.Start,
alignItems: ItemAlign.Start
}) {
Text('1').width(150).height(this.textHeight).backgroundColor(0xF5DEB3).key('AlignContentFlexStartP_fixed_1')
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('AlignContentFlexStartP_fixed_2')
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('AlignContentFlexStartP_fixed_3')
Text('4').width(150).height(200).backgroundColor(0xD2B48C).key('AlignContentFlexStartP_fixed_4')
}
.key('AlignContentFlexStartP_fixed_flex')
.width(500)
.height(400)
.backgroundColor(0xAFEEEE)
}.width('100%')
}
}
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
@Entry @Entry
@Component @Component
struct FlexAlignSelf_Auto { struct FlexAlignSelf_Auto {
private content: string = "FlexAlignSelf_Auto Page" private content: string = "FlexAlignSelf_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexAlignSelf_Center page show called'); console.info('FlexAlignSelf_Auto page show called');
} }
onBuildDone() { onBuildDone() {
...@@ -28,15 +28,15 @@ struct FlexAlignSelf_Auto { ...@@ -28,15 +28,15 @@ struct FlexAlignSelf_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexTest12').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexTest12').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).alignSelf(ItemAlign.End).key('textAlignSelf01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).alignSelf(ItemAlign.End).key('textAlignSelf01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textAlignSelf02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textAlignSelf02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textAlignSelf03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textAlignSelf03');
} }
.key('flexAlignSelf') .key('flexAlignSelf')
.height(150) .height(150)
......
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexBase_Auto { struct FlexBase_Auto {
@State testHeight: number = 150 @State testHeight: number = 150;
@State testWidth: number = 450 @State testWidth: number = 450;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
private content: string = "FlexBase_Auto Page" private content: string = "FlexBase_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexBase_Center onPageShow'); console.info('FlexBase_Auto onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') { if (message.name == 'height') {
this.testHeight = message.value; this.testHeight = message.value;
} }
...@@ -45,15 +45,15 @@ struct FlexBase_Auto { ...@@ -45,15 +45,15 @@ struct FlexBase_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexBase_1').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexBase_1').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlex01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlex01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlex02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlex02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlex03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlex03');
} }
.key('flex01') .key('flex01')
.height(this.testHeight) .height(this.testHeight)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexExceed_Auto { struct FlexExceed_Auto {
...@@ -21,12 +21,12 @@ struct FlexExceed_Auto { ...@@ -21,12 +21,12 @@ struct FlexExceed_Auto {
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager()
private content: string = "FlexExceed_Auto Page" private content: string = "FlexExceed_Auto Page"
onPageShow() { onPageShow() {
console.info('FlexBase_Center onPageShow'); console.info('FlexExceed_Auto onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') { if (message.name == 'padding') {
this.testPadding = message.value; this.testPadding = message.value;
} }
...@@ -44,15 +44,15 @@ struct FlexExceed_Auto { ...@@ -44,15 +44,15 @@ struct FlexExceed_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexExceed_1').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexExceed_1').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textExceed01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textExceed01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textExceed02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textExceed02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textExceed03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textExceed03');
} }
.key('flexExceed01') .key('flexExceed01')
.height(200) .height(200)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexHeightModify_Auto { struct FlexHeightModify_Auto {
@State testHeight: number = 50 @State testHeight: number = 50;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
private content: string = "FlexHeightModify_Auto Page" private content: string = "FlexHeightModify_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexHeightModify_Auto onPageShow'); console.info('FlexHeightModify_Auto onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'height') { if (message.name == 'height') {
this.testHeight = message.value; this.testHeight = message.value;
} }
...@@ -40,15 +40,15 @@ struct FlexHeightModify_Auto { ...@@ -40,15 +40,15 @@ struct FlexHeightModify_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexHeightModify').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexHeightModify').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(this.testHeight).backgroundColor(0xF5DEB3).key('textHeightModify01') Text('1').width(150).height(this.testHeight).backgroundColor(0xF5DEB3).key('textHeightModify01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textHeightModify02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textHeightModify02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textHeightModify03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textHeightModify03');
} }
.key('flexHeightModify') .key('flexHeightModify')
.height(150) .height(150)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
@Component @Component
struct FlexMargin_Auto { struct FlexMargin_Auto {
private content: string = "FlexMargin_Auto Page" private content: string = "FlexMargin_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexMargin_Center page show called'); console.info('FlexMargin_Center page show called');
} }
...@@ -29,15 +29,15 @@ struct FlexMargin_Auto { ...@@ -29,15 +29,15 @@ struct FlexMargin_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexTest05').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexTest05').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexMargin01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexMargin01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexMargin02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexMargin02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexMargin03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexMargin03');
} }
.key('flexMargin') .key('flexMargin')
.height(200) .height(200)
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
@Entry @Entry
@Component @Component
struct FlexOffset_Auto { struct FlexOffset_Auto {
private content: string = "FlexOffset_Auto Page" private content: string = "FlexOffset_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexOffset_Auto page show called'); console.info('FlexOffset_Auto page show called');
...@@ -29,15 +29,15 @@ struct FlexOffset_Auto { ...@@ -29,15 +29,15 @@ struct FlexOffset_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexTest09').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexTest09').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).offset({ x: 15, y: 30 }).key('textOffset01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).offset({ x: 15, y: 30 }).key('textOffset01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textOffset02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textOffset02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textOffset03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textOffset03');
} }
.key('flexOffset') .key('flexOffset')
.height(150) .height(150)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexPadding_Auto { struct FlexPadding_Auto {
@State testPadding: number = 0 @State testPadding: number = 0;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
private content: string = "FlexPadding_Auto Page" private content: string = "FlexPadding_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexBase_Center onPageShow'); console.info('FlexPadding_Auto onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'padding') { if (message.name == 'padding') {
this.testPadding = message.value; this.testPadding = message.value;
} }
...@@ -40,15 +40,15 @@ struct FlexPadding_Auto { ...@@ -40,15 +40,15 @@ struct FlexPadding_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexPadding_1').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexPadding_1').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexPadding01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexPadding01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexPadding02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexPadding02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexPadding03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexPadding03');
} }
.key('flexPadding01') .key('flexPadding01')
.height(200) .height(200)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexTextMargin_Auto { struct FlexTextMargin_Auto {
@State testMargin: number = 0 @State testMargin: number = 0;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
private content: string = "FlexTextMargin_Auto Page" private content: string = "FlexTextMargin_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexBase_Center onPageShow'); console.info('FlexBase_Center onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'margin') { if (message.name == 'margin') {
this.testMargin = message.value; this.testMargin = message.value;
} }
...@@ -40,15 +40,15 @@ struct FlexTextMargin_Auto { ...@@ -40,15 +40,15 @@ struct FlexTextMargin_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexTextMargin_1').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexTextMargin_1').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.testMargin).key('textMargin01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.testMargin).key('textMargin01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textMargin02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textMargin02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textMargin03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textMargin03');
} }
.key('flexTextMargin01') .key('flexTextMargin01')
.height(150) .height(150)
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from '../../../../common/MessageManager'; import { MessageManager, Callback } from '../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct FlexVisibility_Auto { struct FlexVisibility_Auto {
@State testVisibility: number = Visibility.Visible @State testVisibility: number = Visibility.Visible;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
private content: string = "FlexVisibility_Auto Page" private content: string = "FlexVisibility_Auto Page";
onPageShow() { onPageShow() {
console.info('FlexVisibility_Auto onPageShow'); console.info('FlexVisibility_Auto onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'visibility') { if (message.name == 'visibility') {
this.testVisibility = message.value; this.testVisibility = message.value;
} }
...@@ -39,15 +39,15 @@ struct FlexVisibility_Auto { ...@@ -39,15 +39,15 @@ struct FlexVisibility_Auto {
build() { build() {
Column() { Column() {
Column() { Column() {
Text('FlexTest10').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('FlexTest10').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ Flex({
direction: FlexDirection.Row, direction: FlexDirection.Row,
alignItems: ItemAlign.Auto, alignItems: ItemAlign.Auto,
wrap: FlexWrap.NoWrap, wrap: FlexWrap.NoWrap,
}) { }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).visibility(this.testVisibility).key('textVisible01') Text('1').width(150).height(50).backgroundColor(0xF5DEB3).visibility(this.testVisibility).key('textVisible01');
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textVisible02') Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textVisible02');
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textVisible03') Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textVisible03');
} }
.key('flexVisible') .key('flexVisible')
.height(150) .height(150)
......
...@@ -13,33 +13,33 @@ ...@@ -13,33 +13,33 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager' import { MessageManager, Callback } from './../../../../common/MessageManager'
@Entry @Entry
@Component @Component
struct AlignCenter_AddAlign { struct AlignCenter_AddAlign {
@State DadAddAlign: number = Alignment.TopStart @State DadAddAlign: number = Alignment.TopStart;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_NoSpace onPageShow') console.info('AlignCenter_AddAlign onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadAddAlign') { if (message.name == 'DadAddAlign') {
this.DadAddAlign = message.value; this.DadAddAlign = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAlign_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAlign_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAlign_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAlign_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAlign_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAlign_013");
} }
.key("Center_AddAlign_01") .key("Center_AddAlign_01")
.width(500) .width(500)
......
...@@ -13,32 +13,32 @@ ...@@ -13,32 +13,32 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddAllSpace { struct AlignCenter_AddAllSpace {
@State DadAllSpace: number = 10 @State DadAllSpace: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddAllSpace onPageShow'); console.info('AlignCenter_AddAllSpace onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadAllSpace') { if (message.name == 'DadAllSpace') {
this.DadAllSpace = message.value; this.DadAllSpace = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center;
build() { build() {
Column() { Column() {
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAllSpace_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAllSpace_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_013");
} }
.key("Center_AddAllSpace_01") .key("Center_AddAllSpace_01")
.width(500) .width(500)
......
...@@ -13,21 +13,21 @@ ...@@ -13,21 +13,21 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddLayoutWeight { struct AlignCenter_AddLayoutWeight {
@State OneLayoutWeight1: number = 1; @State OneLayoutWeight1: number = 1;
@State OneLayoutWeight2: number = 1; @State OneLayoutWeight2: number = 1;
@State OneLayoutWeight3: number = 1; @State OneLayoutWeight3: number = 1;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddLayoutWeight onPageShow'); console.info('AlignCenter_AddLayoutWeight onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneLayoutWeight1') { if (message.name == 'OneLayoutWeight1') {
this.OneLayoutWeight1 = message.value; this.OneLayoutWeight1 = message.value;
} }
...@@ -43,18 +43,18 @@ struct AlignCenter_AddLayoutWeight { ...@@ -43,18 +43,18 @@ struct AlignCenter_AddLayoutWeight {
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xF5DEB3) .backgroundColor(0xF5DEB3)
.key("Center_AddLayoutWeight_011") .key("Center_AddLayoutWeight_011")
.layoutWeight(this.OneLayoutWeight1) .layoutWeight(this.OneLayoutWeight1);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddLayoutWeight_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddLayoutWeight_012")
.layoutWeight(this.OneLayoutWeight2) .layoutWeight(this.OneLayoutWeight2);
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddLayoutWeight_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddLayoutWeight_013")
.layoutWeight(this.OneLayoutWeight3) .layoutWeight(this.OneLayoutWeight3);
} }
.key("Center_AddLayoutWeight_01") .key("Center_AddLayoutWeight_01")
.width(500) .width(500)
......
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddMargin { struct AlignCenter_AddMargin {
@State DadMargin: number = 10 @State DadMargin: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddMargin onPageShow'); console.info('AlignCenter_AddMargin onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadMargin') { if (message.name == 'DadMargin') {
this.DadMargin = message.value; this.DadMargin = message.value;
} }
...@@ -36,9 +36,9 @@ struct AlignCenter_AddMargin { ...@@ -36,9 +36,9 @@ struct AlignCenter_AddMargin {
build() { build() {
Column() { Column() {
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddMargin_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddMargin_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddMargin_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddMargin_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddMargin_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddMargin_013");
} }
.key("Center_AddMargin_01") .key("Center_AddMargin_01")
.width(500) .width(500)
......
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddOffset { struct AlignCenter_AddOffset {
@State OneOffset: object = { x: 0, y: 0 } @State OneOffset: object = { x: 0, y: 0 };
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddOffset onPageShow'); console.info('AlignCenter_AddOffset onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneOffset') { if (message.name == 'OneOffset') {
this.OneOffset = message.value; this.OneOffset = message.value;
} }
...@@ -35,12 +35,12 @@ struct AlignCenter_AddOffset { ...@@ -35,12 +35,12 @@ struct AlignCenter_AddOffset {
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddOffset_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddOffset_011")
.offset(this.OneOffset) .offset(this.OneOffset);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOffset_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOffset_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOffset_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOffset_013");
} }
.key("Center_AddOffset_01") .key("Center_AddOffset_01")
.width(500) .width(500)
......
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddOneMargin { struct AlignCenter_AddOneMargin {
@State OneMargin: number = 10 @State OneMargin: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddOneMargin onPageShow'); console.info('AlignCenter_AddOneMargin onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneMargin') { if (message.name == 'OneMargin') {
this.OneMargin = message.value; this.OneMargin = message.value;
} }
...@@ -41,9 +41,9 @@ struct AlignCenter_AddOneMargin { ...@@ -41,9 +41,9 @@ struct AlignCenter_AddOneMargin {
.height(50) .height(50)
.backgroundColor(0xF5DEB3) .backgroundColor(0xF5DEB3)
.key("Center_AddOneMargin_011") .key("Center_AddOneMargin_011")
.margin(this.OneMargin) .margin(this.OneMargin);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneMargin_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneMargin_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneMargin_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneMargin_013");
} }
.key("Center_AddOneMargin_01") .key("Center_AddOneMargin_01")
.width(500) .width(500)
......
...@@ -13,33 +13,33 @@ ...@@ -13,33 +13,33 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddOneWidth { struct AlignCenter_AddOneWidth {
@State OneWidth: number = 100 @State OneWidth: number = 100;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddOneWidth onPageShow'); console.info('AlignCenter_AddOneWidth onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneWidth') { if (message.name == 'OneWidth') {
this.OneWidth = message.value; this.OneWidth = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_011") Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneWidth_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneWidth_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_013");
} }
.key("Center_AddOneWidth_01") .key("Center_AddOneWidth_01")
.width(500) .width(500)
......
...@@ -13,33 +13,33 @@ ...@@ -13,33 +13,33 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddPadding { struct AlignCenter_AddPadding {
@State DadPadding: number = 10 @State DadPadding: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddPadding onPageShow'); console.info('AlignCenter_AddPadding onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadPadding') { if (message.name == 'DadPadding') {
this.DadPadding = message.value; this.DadPadding = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddPadding_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddPadding_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddPadding_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddPadding_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddPadding_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddPadding_013");
}.key("Center_AddPadding_01") }.key("Center_AddPadding_01")
.width(500) .width(500)
.height(200) .height(200)
......
...@@ -13,38 +13,38 @@ ...@@ -13,38 +13,38 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_AddVisibility { struct AlignCenter_AddVisibility {
@State OneVisibility: number = Visibility.Visible; @State OneVisibility: number = Visibility.Visible;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddVisibility onPageShow'); console.info('AlignCenter_AddVisibility onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneVisibility') { if (message.name == 'OneVisibility') {
this.OneVisibility = message.value; this.OneVisibility = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xF5DEB3) .backgroundColor(0xF5DEB3)
.key("Center_AddVisibility_011") .key("Center_AddVisibility_011")
.visibility(this.OneVisibility) .visibility(this.OneVisibility);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddVisibility_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddVisibility_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddVisibility_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddVisibility_013");
} }
.key("Center_AddVisibility_01") .key("Center_AddVisibility_01")
.width(500) .width(500)
......
...@@ -13,33 +13,33 @@ ...@@ -13,33 +13,33 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignCenter_NoSpace { struct AlignCenter_NoSpace {
@State DadWidth: number = 200 @State DadWidth: number = 200;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_NoSpace onPageShow'); console.info('AlignCenter_NoSpace onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadWidth') { if (message.name == 'DadWidth') {
this.DadWidth = message.value; this.DadWidth = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.Center @State justifyContent: FlexAlign = FlexAlign.Center;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_NoSpace_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_NoSpace_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_NoSpace_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_NoSpace_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_NoSpace_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_NoSpace_013");
} }
.key("Center_NoSpace_01") .key("Center_NoSpace_01")
.width(this.DadWidth) .width(this.DadWidth)
......
...@@ -13,33 +13,33 @@ ...@@ -13,33 +13,33 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignEnd_AddAlign { struct AlignEnd_AddAlign {
@State DadAddAlign: number = Alignment.TopStart @State DadAddAlign: number = Alignment.TopStart;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddAlign onPageShow'); console.info('AlignEnd_AddAlign onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadAddAlign') { if (message.name == 'DadAddAlign') {
this.DadAddAlign = message.value; this.DadAddAlign = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.End @State justifyContent: FlexAlign = FlexAlign.End;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAlign_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAlign_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAlign_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAlign_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAlign_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAlign_013");
} }
.key("End_AddAlign_01") .key("End_AddAlign_01")
.width(500) .width(500)
......
...@@ -13,32 +13,32 @@ ...@@ -13,32 +13,32 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignEnd_AddAllSpace { struct AlignEnd_AddAllSpace {
@State DadAllSpace: number = 10 @State DadAllSpace: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddAllSpace onPageShow'); console.info('AlignEnd_AddAllSpace onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadAllSpace') { if (message.name == 'DadAllSpace') {
this.DadAllSpace = message.value; this.DadAllSpace = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.End @State justifyContent: FlexAlign = FlexAlign.End;
build() { build() {
Column() { Column() {
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAllSpace_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAllSpace_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAllSpace_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAllSpace_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAllSpace_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAllSpace_013");
} }
.key("End_AddAllSpace_01") .key("End_AddAllSpace_01")
.width(500) .width(500)
......
...@@ -13,21 +13,21 @@ ...@@ -13,21 +13,21 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignEnd_AddLayoutWeight { struct AlignEnd_AddLayoutWeight {
@State OneLayoutWeight1: number = 1; @State OneLayoutWeight1: number = 1;
@State OneLayoutWeight2: number = 1; @State OneLayoutWeight2: number = 1;
@State OneLayoutWeight3: number = 1; @State OneLayoutWeight3: number = 1;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddLayoutWeight onPageShow'); console.info('AlignEnd_AddLayoutWeight onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneLayoutWeight1') { if (message.name == 'OneLayoutWeight1') {
this.OneLayoutWeight1 = message.value; this.OneLayoutWeight1 = message.value;
} }
...@@ -41,21 +41,21 @@ struct AlignEnd_AddLayoutWeight { ...@@ -41,21 +41,21 @@ struct AlignEnd_AddLayoutWeight {
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.End @State justifyContent: FlexAlign = FlexAlign.End;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1') Text('1')
.width(150) .width(150)
.height(50) .height(50)
.backgroundColor(0xF5DEB3) .backgroundColor(0xF5DEB3)
.key("End_AddLayoutWeight_011") .key("End_AddLayoutWeight_011")
.layoutWeight( this.OneLayoutWeight1) .layoutWeight( this.OneLayoutWeight1);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddLayoutWeight_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddLayoutWeight_012")
.layoutWeight( this.OneLayoutWeight2) .layoutWeight( this.OneLayoutWeight2);
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddLayoutWeight_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddLayoutWeight_013")
.layoutWeight( this.OneLayoutWeight3) .layoutWeight( this.OneLayoutWeight3);
} }
.key("End_AddLayoutWeight_01") .key("End_AddLayoutWeight_01")
.width(500) .width(500)
......
...@@ -13,32 +13,32 @@ ...@@ -13,32 +13,32 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignEnd_AddMargin { struct AlignEnd_AddMargin {
@State DadMargin: number = 10 @State DadMargin: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddMargin onPageShow'); console.info('AlignEnd_AddMargin onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'DadMargin') { if (message.name == 'DadMargin') {
this.DadMargin = message.value; this.DadMargin = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.End @State justifyContent: FlexAlign = FlexAlign.End;
build() { build() {
Column() { Column() {
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddMargin_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddMargin_011");
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddMargin_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddMargin_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddMargin_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddMargin_013");
} }
.key("End_AddMargin_01") .key("End_AddMargin_01")
.width(500) .width(500)
......
...@@ -13,34 +13,34 @@ ...@@ -13,34 +13,34 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignEnd_AddOffset { struct AlignEnd_AddOffset {
@State OneOffset: object = { x: 0, y: 0 } @State OneOffset: object = { x: 0, y: 0 };
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddOffset onPageShow'); console.info('AlignEnd_AddOffset onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneOffset') { if (message.name == 'OneOffset') {
this.OneOffset = message.value; this.OneOffset = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.End @State justifyContent: FlexAlign = FlexAlign.End;
build() { build() {
Column() { Column() {
Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%');
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddOffset_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddOffset_011")
.offset(this.OneOffset) .offset(this.OneOffset);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOffset_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOffset_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOffset_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOffset_013");
} }
.key("End_AddOffset_01") .key("End_AddOffset_01")
.width(500) .width(500)
......
...@@ -13,26 +13,26 @@ ...@@ -13,26 +13,26 @@
* limitations under the License. * limitations under the License.
*/ */
import {MessageManager,Callback} from './../../../../common/MessageManager'; import { MessageManager, Callback } from './../../../../common/MessageManager';
@Entry @Entry
@Component @Component
struct AlignEnd_AddOneMargin { struct AlignEnd_AddOneMargin {
@State OneMargin: number = 10 @State OneMargin: number = 10;
messageManager:MessageManager = new MessageManager() messageManager:MessageManager = new MessageManager();
onPageShow() { onPageShow() {
console.info('AlignSpaceEvenly_AddOneMargin onPageShow'); console.info('AlignEnd_AddOneMargin onPageShow');
globalThis.value = { globalThis.value = {
name:'messageManager',message:this.messageManager name:'messageManager',message:this.messageManager
} }
let callback:Callback = (message:any) => { let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value); console.log('message = ' + message.name + "--" + message.value);
if (message.name == 'OneMargin') { if (message.name == 'OneMargin') {
this.OneMargin = message.value; this.OneMargin = message.value;
} }
} }
this.messageManager.registerCallback(callback); this.messageManager.registerCallback(callback);
} }
@State justifyContent: FlexAlign = FlexAlign.End @State justifyContent: FlexAlign = FlexAlign.End;
build() { build() {
Column() { Column() {
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
...@@ -41,9 +41,9 @@ struct AlignEnd_AddOneMargin { ...@@ -41,9 +41,9 @@ struct AlignEnd_AddOneMargin {
.height(50) .height(50)
.backgroundColor(0xF5DEB3) .backgroundColor(0xF5DEB3)
.key("End_AddOneMargin_011") .key("End_AddOneMargin_011")
.margin(this.OneMargin) .margin(this.OneMargin);
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOneMargin_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOneMargin_012");
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOneMargin_013") Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOneMargin_013");
} }
.key("End_AddOneMargin_01") .key("End_AddOneMargin_01")
.width(500) .width(500)
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册