Back to top

White bar appears after using hideSystemBar() to remove navigation bar


  • Knox SDK
  • Android 9
  • Kiosk Mode


After using the Knox SDK API KioskMode.hideSystemBar() in Android 9, the navigation bar is hidden and replaced by a white bar. Below is some sample code demonstrating the API usage:

EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(this);
KioskMode km = edm.getKioskMode();

When the above is invoked, the status bar and the navigation bar are hidden.


By API design, the top status bar and navigation buttons are hidden with the white space appearing in its place.


This is expected Knox API behaviour, as the purpose of the API is only to hide the status bar and navigation buttons from view.


To ensure the white bar is removed while still hiding the navigation buttons, invoke SystemManager.setStatusBarMode() instead. The following is an example of how to do this:

CustomDeviceManager cdm = CustomDeviceManager.getInstance();
SystemManager sm = cdm.getSystemManager();

You must have a KPE Premium license to use the CustomDeviceManager object.

Additional information

Use either KioskMode.hideSystemBar(boolean) or SystemManager.setStatusBarMode(int), but not both.

  1. If KioskMode.hideSystemBar(true) is called and then SystemManager.setStatusBarMode(CustomDeviceManager.HIDE) is called, SystemManager.setStatusBarMode(CustomDeviceManager.HIDE) will not work.
  2. If SystemManager.setStatusBarMode(CustomDeviceManager.HIDE) is called and then KioskMode.hideSystemBar(true) is called, then SystemManager.setStatusBarMode(CustomDeviceManager.SHOW) will fail.
Back to KBAs

Is this page helpful?