0

I know this has been asked many times and I have had it solved before but it seems they have some sick desire to make the navigation bar show up for a moment when using a spinner. I am using the dropdown mode and would prefer it but a solution with the popup window would be ok.

I have previously used both the answers posted here: Android: Spinner dropdown in full screen

as well as these flags:

setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN |
                    View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
                    View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)

Is there a way to prevent the Navigation bar from showing up when using a spinner in Android 10? Is this possibly related to using card view and if so is there a way to stop it there?

Burnrate
  • 13
  • 5
  • 1
    A spinner creates a popup window to display its items. I suspect that this window has the wrong flags so you probably have to set the right ones. – Nicolas Nov 06 '20 at 22:59
  • @Nicolas I should have specified I am using the dropdown mode. I would be happy for a solution using either the popup mode or dropdown mode though. – Burnrate Nov 06 '20 at 23:29
  • "Is this possibly related to using card view" -- probably not. I agree with Nicolas; this is from the window that `Spinner` creates. We do not have direct access to that window, and so there is no good way to set flags on it. I did some nasty hacks to try to manage such windows [to be able to add `FLAG_SECURE`](https://github.com/commonsguy/cwac-security/blob/master/docs/FLAGSECURE.md). I would recommend not using `Spinner`. – CommonsWare Nov 06 '20 at 23:57

0 Answers0