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
2
votes
1 answer

Android/Unity - Fullscreen mode, Android's status bar, and 3D aspect ratios

I have been racking my brain a week now trying things left and right and I cannot seem to find the answer. I might actually have more questions. We have an application that uses a Unity view in one of its activities to present some graphics. As this…
2
votes
1 answer

How to hide navigation bar when edittext is focused in immersive mode

I am developing a single-use device with Android. HW has a full keyboard but no main keys (Back, Home, Overview). Some of the app should be working in immersive mode and they contain EditText fields. When the app is in immersive mode (I used Lock…
2
votes
1 answer

Xamarin.Forms Android immersive mode with soft keyboard or Alert

I am trying to get my Xamarin.Forms application to use Android's immersive mode, since I am using a device with small screen, so soft keys and navigation bar is stealing my precious screen real estate. Since the device I am using features hardware…
2
votes
1 answer

Is it possible to determine if the screen is now immersive or not, even if not in the foreground?

Background I'm investigating how to replace the UI of the dialer, when the user gets a phone call (incoming/outgoing phone calls). This seems to be possible in 2 ways: On old Android versions, it's possible by having an on top view that is…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
2
votes
1 answer

When Android automatically exits Immersive Sticky it does not resize views so they are blocked

I have an activity which can go to Immersive Sticky Full Screen on the click of the button. This button does the following code in order to get into Immersive Sticky Full Screen. getActivity().getWindow().getDecorView().setSystemUiVisibility( …
se22as
  • 2,282
  • 5
  • 32
  • 54
2
votes
0 answers

Android - DrawerLayout issue with Immersive Full-Screen Mode

I am using full-screen immersive mode with a drawer. The issue is that after adding the mode, the drawer shows a shadow a the top and a blank space at the bottom as if it still thinks that the status bar and the navigation bar are present. This can…
2
votes
2 answers

Android Hide Navigation Bar/Stay in Immersive Mode when Button clicked

What seems like a really simple thing is causing me a few issues. I have looked at the solutions from: Android Hide Navigation Bar/Stay in Immersive Mode with Soft Keyboard Appearance. I have a simple activity with a ImageButton on. I want to be…
Burf2000
  • 5,001
  • 14
  • 58
  • 117
2
votes
1 answer

Using android:fitsSystemWindows="true/false" Navigation drawer height changing and Navigation bar becoming white

I am working on UnityPlayerActivity in which camera is rendering on complete screen on top of which, having my Toolbar and Navigation drawer. So I am facing following issues as Case A : Used android:fitsSystemWindows="false" Shows navigation drawer…
Narendra
  • 609
  • 1
  • 12
  • 28
2
votes
1 answer

Android immersive mode for dropdown, hide navigation Bar

added listview to PopupWindow object, on click Navigation key bar is popping, is there is a way to block navigation bar on click of dropdown.
2
votes
3 answers

Popup window is displayed with a space/gap on immersive mode, on Marshmallow only

Specifically on Marshmallow (tested on Nexus 5X and 6P) when I open a PopupWindow (which has match_parent width and height) over a screen in immersive mode, the content of the popup doesn't expand to full screen, there's a gap where the navigation…
2
votes
3 answers

Status bar background stays on screen when entering immersive mode?

I've been searching everywhere but I'm at a loss about that : trying to activate immersive mode on a project; Nearly everything works fine, except the background of my status bar always stays there, spoiling the immersion... I have included a…
Shiva
  • 33
  • 5
2
votes
0 answers

Hide Navigation Bar in Android after swipe

I am writing an android application which should run in the immersive mode. I want to hide the navigation bar and for that I wrote a method as :- public void hideSystemUI() { getWindow().getDecorView().setSystemUiVisibility( …
2
votes
1 answer

How to make Toolbar overlay and be immersed?

I want to make my app be immersed seems like this following reader app, but it doesn't work as I wanted, can someone give me idea? Normal When normal, the toolbar and the status is hidden. Pull the status When pull the status, the status…
2
votes
0 answers

Android hide navigation bar in Spinner dropdown mode

I was able to set Immersive mode in my app that properly hides navigation and status bars in almost every case. The only exclusion I found so far is, that when I tap on a Spinner component that has android:spinnerMode="dropdown", the navigation bar…
Sleeper9
  • 1,707
  • 1
  • 19
  • 26
1
vote
1 answer

flutter: android navbar stays after keyboard use, even though in SystemUiMode.immersive

i have a flutter app using SystemUiMode.immersive, but when i use my keyboard and discards it, the navbar (and status bar) stays on the app. I have code that removes them if you touch the screen, but sometimes they hide things and users get…