Questions tagged [android-immersive]

For the android sticky `SYSTEM_UI_FLAG_IMMERSIVE_STICKY` and non-sticky `SYSTEM_UI_FLAG_IMMERSIVE` immersive mode. A mode that allows the developer to manage a full screen state of the app, while allowing the user to swipe and view system and nav bars.

To implement immersion mode with the SYSTEM_UI_FLAG_HIDE_NAVIGATION or `SYSTEM_UI_FLAG_FULLSCREEN must be used.

Non-sticky mode is recommended for apps where users need regular access to app system and nav bars.

With non sticky immersion, when the system and/or nav bars are swiped and made visible, the flags for SYSTEM_UI_FLAG_HIDE_NAVIGATION and SYSTEM_UI_FLAG_FULLSCREEN are cleared. To re-implement the immersion mode there needs to be an OnSystemUiVisibilityChangeListener

Sticky immersion is suitable apps where the user does not need access to system or nav bars for a sustained duration, and they may in fact be an impediment to the app, for example game apps.

In this case the flags are not cleared and the view from full screen is only transient, as immersion is reinstated. There is no need for a OnSystemUiVisibilityChangeListener, as this is not regarded as a change in the view state.

Information is taken from https://developer.android.com/training/system-ui/immersive.html

105 questions
27
votes
5 answers

Immersive Mode showing blank space

I'm trying to implement a fullscreen mode, but for Android 4.4 and up, it shows a blank space there: BEFORE immersive mode(fullscreen) and AFTER the toggleFullScreen(false); as you can see, its doesn't remove it. Here's the code that I'm using to…
user2582318
  • 1,607
  • 5
  • 29
  • 47
16
votes
2 answers

Status Bar appears when soft keyboard appears but not hidden back when soft keyboard disappears while in Immersive Mode

Initially I set my Activity to be in Immersive Mode with the following code: View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |…
9
votes
5 answers

Maintain Immersive mode when DialogFragment is Shown

I have an Android Application that is made using Fragments I am hiding the bars at top and bottom of my screen, using the following code. @Override protected void onResume() { super.onResume(); isInBackground = false; if(null ==…
8
votes
0 answers

Android Snackbar Is Hidden Behind System UI

I've got a full screen Activity that does a hide/show of the system UI using the following two functions: // This snippet hides the system bars. public static void hideSystemUI(View view) { // Set the IMMERSIVE flag. // Set the content to…
Christopher Perry
  • 38,891
  • 43
  • 145
  • 187
7
votes
3 answers

Android videoview - immersive - overlapping controllers

I have a videoview on my app and Im using gogole as a reference to make the video player full screen: https://developer.android.com/training/system-ui/immersive#java I was following the instruccion from the above website and i was able to make…
Pedro
  • 1,440
  • 2
  • 15
  • 36
7
votes
1 answer

White space when using Immersive Full-Screen Mode in android

I use below code to use Immersive Full-Screen Mode: getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |…
hassan moradnezhad
  • 455
  • 2
  • 6
  • 26
7
votes
2 answers

Make Xamarin Forms for Android Fullscreen

Is there anyway to get my Xamarin Forms application on Android go fullscreen or immersive mode? I tried the following, and all the controls on the status bar are hidden but the status bar itself is still showing. Any help, please var newUiOptions =…
6
votes
0 answers

Android full screen sticky immersive mode - how to change the navigation bar background or icon colors?

I followed the Android dev tutorial 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…
Lifes
  • 1,226
  • 2
  • 25
  • 45
6
votes
2 answers

How do I maintain the Immersive Mode in Spinner?

I use immersive-sticky mode to hide the navigation bar and action bar: @TargetApi(19) private void setImmersiveMode() { if (Build.VERSION.SDK_INT >= 19) { View decorView = getWindow().getDecorView(); int uiOptions =…
activity
  • 2,653
  • 3
  • 20
  • 44
6
votes
4 answers

How to preserve immersive mode on orientation change?

Currently using this block of code in Activity class to enter sticky immersive mode: override fun onWindowFocusChanged(hasFocus: Boolean) { super.onWindowFocusChanged(hasFocus) if (hasFocus && android.os.Build.VERSION.SDK_INT > 15) { …
Nick
  • 61
  • 2
6
votes
2 answers

android:fitsSystemWindows="true" has issues with using DrawerLayout and immersive mode

I'm having issues when trying to use immersive mode and using android:fitsSystemWindows="true" with DrawerLayout. I have to set this to true for the DrawerLayout and toolbar to be constrained to the system bar. The issue is, I have a Fragment which…
6
votes
0 answers

Popup windows in Immersive Sticky mode

Immersive sticky mode does not seem to work when popup windows are used in an android app. The status and nav bars do come into focus for the duration of the pop up. While i was able to reset the System UI flags for Alert dialogs to avoid this…
Prathibha
  • 71
  • 1
6
votes
5 answers

Android Immersive mode reset when changing activity

I'm facing a problem when using immersive mode. Here is the code I put on all activities: @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if (hasFocus) { …
Valentin
  • 5,379
  • 7
  • 36
  • 50
5
votes
2 answers

How to fix : Navigation bar icons still showing, when pop-up menu is opened (Full screen - Immersive sticky)

I'm trying to achieve a full-screen application, where the user doesn't have any access to the status- & navigation-bar. Preferably I would want them to be removed completely, but from what I've read this is not possible unless you root the…
5
votes
0 answers

Android - Toggling Immersive Mode turns on Action Bar Overlay Mode

I am trying to implement Immersive (Fullscreen) Mode in my Android Application, and I'm running into a problem that I cannot solve. I'm following the Immersive Mode guide and sample apps from the Android Docs, and it mostly works, but when exiting…
Bradleycorn
  • 980
  • 6
  • 9
1
2 3 4 5 6 7