0

I am working on custom screen lock app where we need to full screen view hiding the top and bottom bars completely. The app is for Android phones only and not tablets. I achieved this partially by using Immersive mode but the issue is the bottom bar & top appears for few seconds on touching bottom or top of the screen.

Below is the code in my activity to do this :

final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_FULLSCREEN
                | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
getWindow().getDecorView().setSystemUiVisibility(flags);

I have tried various options but unable to hide the bars permanently. Please advise.

Gaurav
  • 535
  • 1
  • 8
  • 28
  • possible duplicate of [Permanently hide navigation bar on activity](http://stackoverflow.com/questions/16713845/permanently-hide-navigation-bar-on-activity) – Simas May 29 '15 at 09:38
  • I hope that it is not able to be achieved. If there is way, then apps like this can block the screen without any way to unblock it. – Vladyslav Matviienko May 29 '15 at 09:39
  • @metalurgus This is possible. Since I am working on Screen lock app, user would be able to enter only once correct password in entered. NextLock from Microsoft does the same. – Gaurav May 29 '15 at 09:50
  • @Simas Thanks for the reply. I had already checked this post and tried as suggested but no result. Seems I am missing some thing. – Gaurav May 29 '15 at 09:51

0 Answers0