0

Is it possible to keep the navigation bar hidden when requesting for a permission in android? I currently have it hidden on all my activities by using the following code:

View decorView = getWindow().getDecorView();
    decorView.setSystemUiVisibility(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);

When i then request for permission the navigation bar pops up... I can not seem to find an answer anywhere, and i'm unsure if it is even possible.

Emil
  • 35
  • 7
  • permission requesting prompts are not our application based. So, i think we have no control on it. See this answer https://stackoverflow.com/a/33266342/7910735 – Sahdeep Singh Dec 04 '18 at 17:24
  • no you can not until you create customised pop ups and use them to request the permissions manually but why go the difficult way? – HarshitMadhav Dec 04 '18 at 17:25
  • @SahdeepSing thanks for the link :) – Emil Dec 04 '18 at 17:27
  • @HarshitAgrawal the reason is that i hate when its not perfect, even though it is only first time you launch the app, that it will ever happen – Emil Dec 04 '18 at 17:28
  • @Emil refer to the last answer of this and try it out and then let me know https://stackoverflow.com/questions/33266328/how-can-i-customize-permission-dialog-in-android/33266342#33266342#37296542 – HarshitMadhav Dec 04 '18 at 17:32
  • I wonder why you say it's not perfect? What do you mean exactly? What do you mean by navigation bar by the way? Do you mean the `ActionBar`? This sounds like something coming from iOS? – Darwind Dec 04 '18 at 21:01
  • @HarshitAgrawal I decided not to check it out, and just let it be as it is, it seemed like alot of trouble for such a little thing. – Emil Dec 05 '18 at 18:38
  • @Darwind I am referring to the bar which appear on the bottom of phones which does not physically have a "home", "back" , "and the last button" button on their phone but instead on the display – Emil Dec 05 '18 at 18:40
  • @Emil ah yes - I believe it's usually referred to as the `system navigation bar` as it's a system bar. But nonetheless: why do you want to remove it? Unless you're making a game there should be absolutely no reason to remove this bar. If you remove it you force the user to make a decision to either accept or decline your permission request - what if I as a user don't want to make this decision right away? – Darwind Dec 05 '18 at 21:07

0 Answers0