北向应用开发-StackLayout不同样式色调体验 原创

鸿蒙时代
发布于 2021-4-5 11:29
浏览
0收藏

显示效果:

  北向应用开发-StackLayout不同样式色调体验-鸿蒙开发者社区

布局中的代码

<?xml version="1.0" encoding="utf-8"?>
<StackLayout
    xmlns:ohos="http://schemas.huawei.com/res/ohos"
    ohos:id="$+id:stack_layout"
    ohos:height="match_parent"
    ohos:width="match_parent">


    <Text
        ohos:id="$+id:jltftext_blue"
        ohos:text_alignment="bottom|horizontal_center"
        ohos:text_size="24fp"
        ohos:text="jltf 1"
        ohos:height="400vp"
        ohos:width="400vp"
        ohos:background_element="#3F56EA" />


    <Text
        ohos:id="$+id:jltftext_purple"
        ohos:text_alignment="bottom|horizontal_center"
        ohos:text_size="24fp"
        ohos:text="jltf 2"
        ohos:height="300vp"
        ohos:width="300vp"
        ohos:background_element="#00AAEE" />


    <Text
        ohos:id="$+id:jltftext_orange"
        ohos:text_alignment="bottom|horizontal_center"
        ohos:text_size="24fp"
        ohos:text="jltf 3"
        ohos:height="200vp"
        ohos:width="200vp"
        ohos:background_element="#00BFC9" />
    <Text
        ohos:id="$+id:jltftext_red"
        ohos:text_alignment="bottom|horizontal_center"
        ohos:text_size="24fp"
        ohos:text="jltf 4"
        ohos:height="100vp"
        ohos:width="100vp"
        ohos:background_element="red" />
</StackLayout>

完整代码地址:

https://gitee.com/jltfcloudcn/jump_to/tree/master/jltf_StackLayout_component

©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
分类
标签
收藏
回复
举报
回复
    相关推荐