在 Android 中隐藏主页和返回按钮

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21624131/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:49:57  来源:igfitidea点击:

Hiding Home and Back button in Android

androidback-buttonandroid-homebutton

提问by ik024

I would like my app to hide the Home and Back button which is show at bottom of activity.

我希望我的应用程序隐藏显示在活动底部的主页和返回按钮。

I was able to hide the title bar but I am not able to do for Home and Back button.

我能够隐藏标题栏,但无法隐藏主页和后退按钮。

Is it possible to do it?

有可能做到吗?

回答by Yuichi Araki

Starting from Android 4.4 KitKat, you can use "immersive" full-screen mode. Here's the detail and some sample codes.

从 Android 4.4 KitKat 开始,您可以使用“沉浸式”全屏模式。这是详细信息和一些示例代码。

https://developer.android.com/training/system-ui/immersive.html

https://developer.android.com/training/system-ui/immersive.html