【发布时间】:2017-12-17 08:19:48
【问题描述】:
我正在开发一个与考试相关的 Android 应用程序。考试开始时,我需要锁定状态栏和通知栏。我使用了下面的代码,但它只是隐藏状态栏和通知栏。
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
//Remove notification bar
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
有没有办法锁定状态栏和通知栏而不是隐藏它们。如有任何积极回应,请提前致谢。
【问题讨论】:
标签: android statusbar android-notification-bar