HarmonyOS APP-TabList和Tab体验与分享 原创

鸿蒙时代
发布于 2021-3-18 11:08
浏览
0收藏

效果呈现

HarmonyOS APP-TabList和Tab体验与分享-鸿蒙开发者社区

  

点击上面“jltfvideo”可以换页面

  HarmonyOS APP-TabList和Tab体验与分享-鸿蒙开发者社区

布局中的代码

<?xml version="1.0" encoding="utf-8"?>
<DirectionalLayout
    xmlns:ohos="http://schemas.huawei.com/res/ohos"
    ohos:height="match_parent"
    ohos:width="match_parent"
    ohos:background_element="#444444"
    ohos:orientation="vertical">

    <TabList
        ohos:id="$+id:jltftab_list"
        ohos:weight="1"
        ohos:top_margin="10vp"
        ohos:tab_margin="24vp"
        ohos:tab_length="140vp"
        ohos:text_size="20fp"
        ohos:height="36vp"
        ohos:width="match_parent"
        ohos:layout_alignment="center"
        ohos:orientation="horizontal"
        ohos:text_alignment="center"
        ohos:normal_text_color="#999999"
        ohos:selected_text_color="#FFFFFF"
        ohos:selected_tab_indicator_color="#FFFFFF"
        ohos:selected_tab_indicator_height="2vp"/>

    <ScrollView
        ohos:id="$+id:tab_jltfcontent"
        ohos:height="match_parent"
        ohos:width="match_parent"
        ohos:padding="10vp"
        ohos:weight="9">

    </ScrollView>
</DirectionalLayout>

完整代码地址:https://gitee.com/jltfcloudcn/jump_to/tree/master/jltf_TabList_and_Tab_component

©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
分类
标签
已于2021-3-18 16:25:24修改
3
收藏
回复
举报
3条回复
按时间正序
/
按时间倒序
鸿蒙张荣超
鸿蒙张荣超

不错👍

回复
2021-3-18 14:52:04
红叶亦知秋
红叶亦知秋

和李洋老师一起成长。

回复
2021-3-18 15:20:31
鸿蒙时代
鸿蒙时代

一起努力

回复
2021-3-18 19:43:00
回复
    相关推荐