如何把导航默认在最底下显示?

<?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:orientation="vertical"
    ohos:background_element="#FFE0E3E3">

    <Text
        ohos:id="$+id:text_helloworld"
        ohos:height="match_content"
        ohos:width="match_content"
        ohos:layout_alignment="horizontal_center"
        ohos:text="$string:mainability_HelloWorld"
        ohos:text_size="40vp"

        />
    <DirectionalLayout
        xmlns:ohos="http://schemas.huawei.com/res/ohos"
        ohos:height="match_content"
        ohos:width="match_parent"
        ohos:orientation="horizontal"
        ohos:background_element="#FFFFFF"
        >
        <Button
            ohos:id="$+id:dynamic"
            ohos:height="match_content"
            ohos:width="match_parent"
            ohos:text="动态"
            ohos:text_size="10vp"
            ohos:element_top="$media:dt"
            ohos:weight="1"/>
        <Button
            ohos:id="$+id:friend"
            ohos:height="match_content"
            ohos:width="match_parent"
            ohos:text="好友"
            ohos:text_size="10vp"
            ohos:element_top="$media:hy"
            ohos:weight="1"/>
        <Button
            ohos:id="$+id:function"
            ohos:height="match_content"
            ohos:width="match_parent"
            ohos:text="功能"
            ohos:text_size="10vp"
            ohos:element_top="$media:gn"
            ohos:weight="1"/>
        <Button
            ohos:id="$+id:set"
            ohos:height="match_content"
            ohos:width="match_parent"
            ohos:text="我的"
            ohos:text_size="10vp"
            ohos:element_top="$media:yh"
            ohos:weight="1"/>
    </DirectionalLayout>
</DirectionalLayout>
鸿蒙
导航
显示
2022-07-20 15:26:24
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
望海亦
3

DirectionalLayout默认从上往下,楼主可以参考DependentLayout

https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ui-java-layout-dependentlayout-0000001050729536

分享
微博
QQ
微信
回复
2022-07-20 17:00:29
相关问题
webview导航无法正常导航,怎么处理?
3231浏览 • 1回复 待解决
鸿蒙开发如何默认启动ability
5052浏览 • 3回复 待解决
太难了,能从基础讲起吗?
3644浏览 • 1回复 待解决
鸿蒙如何获取导航栏和状态栏高度
7679浏览 • 1回复 待解决
鸿蒙webview如何去除默认的白色背景?
1483浏览 • 1回复 待解决
如何公共事件发布给其他设备
1956浏览 • 1回复 待解决
js如何list组件设置为横向的?
1405浏览 • 1回复 待解决
鸿蒙WebView 层级 总是处于外层
4492浏览 • 3回复 待解决
导航换装 车机版 鸿蒙系统
8610浏览 • 1回复 待解决
社区一周年,大家期待什么?
10062浏览 • 5回复 已解决
鸿蒙开发现在缺的是什么?
4600浏览 • 2回复 待解决
openharmony jsFA 如何横屏显示
4268浏览 • 1回复 待解决