隐藏Android的导航按钮

问题描述 投票:-1回答:1

如下图所示在显示初始屏幕时如何隐藏底部导航栏?

This image is an example of what is needed该图像是所需内容的示例]

java android
1个回答
0
投票

尝试您的活动this

window.decorView.apply {
    // Hide both the navigation bar and the status bar.
    // SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
    // a general rule, you should design your app to hide the status bar whenever you
    // hide the navigation bar.
    systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_FULLSCREEN
}
© www.soinside.com 2019 - 2024. All rights reserved.