DevBytes: Android 4.4 Immersive Mode

Android Developers · 81K views · 2013 · 9:50

Open on YouTube

Software (other)Testing, debugging & developer toolstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about hiding the navigation bar, full-screen apps and how immersive and sticky immersive modes behave.

Recommended by 3 people across 2 different months, 2013 to 2021.

What it is

A roughly ten minute Android Developers DevBytes video, presented by Roman Nurik, on the Android 4.4 KitKat Immersive Mode API. It shows how to hide the status and navigation bars while still capturing all touch events, and recaps the earlier full-screen flags on Android.

What people said

Recommends Martin Pfeffer · 2014-12 · Stack Overflow · on “Permanently hide Navigation Bar in an activity”

After watching the DevBytes video [this video] (by Roman Nurik) and reading the very last line in the docs, which says: Note: If you like the auto-hiding behavior of IMMERSIVE_STICKY but need to show your own UI controls as well, just use IMMERSIVE combined with Handler.postDelayed() or something similar to re-enter immersive mode after a few seconds. the answer, radu122 gave, worked for me. Just setup a handler and your will be good to go. Here is the code which works for me: @Override protected void onResume() { super.onResume(); executeDelayed(); } private void executeDelayed() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { // execute afte

Recommends paulscode · 2014-12 · Stack Overflow · on “Hiding navigation bar without rooting on android”

I believe what you are describing that you have seen in some games is called "Immersive Mode". The navigation bar disappears completely, and a gesture from the edge of the screen brings it back. This feature is available starting at Android version 4.4. Before Android 4.4, since Android version 4.0, you can use the "Hide Navigation" flag, which will temporarily hide the navigation bar. The problem with this mode is that any interaction with the screen will cause the navigation bar to reappear. This of course isn't very useful for apps that require a lot of interaction with the screen, like most games. I typically use the following functions for moving in and out of immersive mode: private vo

Recommends freddieptf · 2015-03 · Stack Overflow · on “How to make ViewPager fullscreen?”

Fullscreen? You might want to look into androids Immersive mode and save yourself all that layout params trouble. This devbyte might help [this video]

Cites Douglas Drumond Kayama · 2013-11 · Stack Overflow · on “Detecting when system buttons are visible while using 'immersive mode'”

From Android Developers video, when you're in immersive sticky mode, the app isn't notified. Immersive sticky mode starts at 6:56 and around 7:25 Roman Nurik tells that the listener won't be triggered. This is the video: [this video]

Cites Assaf Gamliel · 2014-01 · Stack Overflow · on “How to disable Home and other system buttons in Android?”

First of, please think long and hard if you really want to disable the Home button or any other button for that matter (e.g. the Back button), this is not something that should be done (at least most of the times, this is a bad design). I can speak only for myself, but if I downloaded an app that doesn't let me do something like clicking an OS button, the next thing I do is uninstall that app and leave a very bad review. I also believe that your app will not be featured on the App Store. Now... Notice that MX Player is asking permission to draw on top of other applications: Since you cannot override the Home button on Android device (at least no in the latest OS versions). MX Player draws it

Cites ik024 · 2014-07 · Stack Overflow · on “Is there a way to hide the system/navigation bar in Android ICS”

Using the below code is one way of doing it to hide navigation getWindow().getDecorView() .setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); But the problem with the above is that it becomes visible as soon as user touches the screen. In Android Kitkat there is a feature called as IMMERSIVE which hides the notification bar and the navigation. It does not show even if the user interacts with the screen. However the user can make it visible by swiping it from top of the screen to bottom. Below is the code to achieve it //Initializew this in onCreate() View mDecorView = getWindow().getDecorView(); //Then call this function private void hideSystemUI() { mDecorView.setSystemUiVisibility

Cites Piotr Siatkowski · 2015-03 · Stack Overflow · on “Is it possible to restrict or change android immersive (immersive-sticky) mode swipe detection area?”

I am making a Libgdx game on my android device, which uses finger swipes a lot. I want it to be in fullscreen mode with navigation bar hidden , that's why I set the useImmersiveMode flag found in AndroidApplicationConfiguration class. Unfortunately, navigation bar pops up every time I try to drag an item from the inventory, which is located on the right side of the screen. I have tried many options with not satisfying results. Immersive sticky mode works perfectly, but it results in navigation bar appearing all the time, which is very annoying. Immersive non-sticky mode has similar flaws and I didn't find a way to restrict navigation bar swipe area. I tried to hide system UI as fast as possi

Cites Lifes · 2020-06 · Stack Overflow · on “Android full screen sticky immersive mode - how to change the navigation bar background or icon colors?”

I followed the Android dev tutorial [LINK] and got full screen sticky immersive mode working. This makes the status bar and navigation bar hidden until the user swipes up from the bottom or down from the top, at which point they appear and slowly fade out if not used. The problem is on Android 10 (and possibly other versions): the navigation bar at the bottom of the screen is just white icons. There's no transparent black background. This makes it really hard to see with a light UI. Is there any way to change the background or icon colors of the navigation bar? Specifically the sticky immersive navigation bar that appears and fades away (since it is too light to work with light UI's). I've t

Cites Zoltán Balogh · 2021-08 · Stack Overflow · on “How to make android app fullscreen with ionic-react?”

So there are a few options to do this. First, what I posted a few hours ago after then I have noticed that, if you are not using immersive sticky you should write a handler that set back the flags (based on VIDEO OF FLAGS [this video] ) Then I started to research a better solution... What I've found. We will need three plugins from Ionic @capacitor/status-bar [LINK] @cordova/navigation-bar [LINK] Before jump to the implementation install the Capacitor and Cordova plugins correctly: npm install rxjs npm install @ionic-native/core npm install @capacitor/status-bar npm install cordova-plugin-navigationbar npm install @ionic-native/navigation-bar npx capacitor sync [1. HIDE NAVIGATION AND STATUS BAR]