Example of immersive mode that hides the navigation bar and keeps the status bar is attached.
It required a few changes. Note that the layout is loaded to the panel and not the activity.
I know I try to strictly follow Android documentation.
About your sample. Using constants, for example, Array As Object(4866) makes a code less read-able.
Of course, it's possible to decrypt, but more clear if you will show (as comment) the names of flags.
It is a mistake to post code that you know is not working properly and cannot be used (without writing it clearly). Why cause developers to download the project, test it and see that it is not working?
first of all thank you very much for the solution proposals.
also in erel's example the navigation bar appears when I use an edit text field or a spinner. The navigation bar is also displayed when a message window is displayed.
Also happens here. However the bar disappears automatically when the dialog is dismissed. Immersive mode doesn't prevent the bar from ever showing. If you want to completely hide it then you must create a kiosk application.