android - 如何隐藏状态栏?

标签 android android-activity android-statusbar

如何隐藏特定 Activity 的状态栏?

我发现了这个类似的问题,但没有一个答案对我有用。每次我尝试参加 Activity 时,应用程序都会崩溃: How to hide status bar in Android

谢谢。

最佳答案

在设置内容之前在您的 Activity 中尝试这个

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

关于android - 如何隐藏状态栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33705720/

相关文章:

android - 以编程方式设置 windowlightstatusbar 属性

安卓 : status bar color change for API level below 21

java - Android 类标记为从未使用过

Android- SetOutlineAmbientShadowColor 在 api < 28 上没有这样的方法错误

android - AppBarLayout 不会完全折叠并且仅部分展开直到滚动到达顶部

java - 使用后退按钮关闭 Activity 后恢复 Activity

android - 从两个不同的包启动 Activity

android - 状态栏颜色不变

android - 如何在谷歌地图 Android 上显示多个标记?

c# - 将 TextBox 乘以一个值