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
1
vote
1 answer

Lollipop navigation bar overlapping Dialog with Gravity.Bottom

I'm following the technique outlined here in order to have my Dialog float to the bottom of the screen and take up the full width, similar to a drawer. This works on every version of Android that I'm targeting (16+) except for Lollipop. The Dialog…
1
vote
2 answers

Disable/Ask for password before showing top&bottom nav bar

While developing a client survey app for a tablet I realized I have to disable the notification panel from being pulled & hide bottom navigation just in case, for all those funny clients out there trying to be a smart ***. I am working with a non…
1
vote
0 answers

full screen app: stuck navigation bar

I wrote an app that is composed by a full screen webkit object. So, as soon as the activity starts, i set these…
Mark
  • 645
  • 2
  • 9
  • 27
1
vote
0 answers

Immersive app with startActivityForResult

I have a fullscreen, immersive-sticky activity A, which works fine due to: https://developer.android.com/training/system-ui/immersive.html. From there I want to take a picture using startActivityForResult() as in:…
Fabian
  • 973
  • 1
  • 11
  • 14
1
vote
1 answer

Detect Hide Keyboard Event on Android

So I need to keep the immersive mode of an app. The app has a fullscreen webview on immersive mode but the problem is the webview content has a textbox. When the user touch on the textbox, it will trigger the softkeyboard which will disable the…
1
vote
0 answers

How to completely hide the status bar on Android in Immersive full screen mode

I'd like to completely hide the status bar when in Immersive full-screen mode, for the purpose of running a kiosk app. All of the suggested solutions mention methods for preventing the status bar from getting fully expanded, but none show how to…
1
vote
0 answers

android 6.0.1 immersive sticky not working

using the code below in my activity: @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); View decorView = this.getWindow().getDecorView(); …
vims liu
  • 643
  • 1
  • 9
  • 20
1
vote
0 answers

UiAutomator test with immersive mode, can't click things under navigation bar

I am trying to run tests on my app that runs in immersive mode. However, when I try and click on things that would normally be where the navigation bar is, nothing happens, because UiDevice thinks the screen is smaller than it actually is. i.e. it…
Russ Wheeler
  • 2,590
  • 5
  • 30
  • 57
1
vote
0 answers

onSystemUiVisibilityChange listener not called after rotation as should

im pulling my hair on this. What I want to do is system ui + my views toggling with total fullscreen (statusbar and navbar hidden + immersive_sticky) -- By default I want the ui to be hidden, i.e. just content showing. This seems to be a ridiculous…
urSus
  • 12,492
  • 12
  • 69
  • 89
1
vote
0 answers

Immersive screen

I use the following code for immersive sticky screen. public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
David
  • 11
  • 1
1
vote
3 answers

Full-screen between activities

I'm trying to use sticky immersive full-screen in my app (as described here). However, when switching activities the navigation and status bar will show up at first and after a few moments disappear again. Is there any way to ensure that my app…
1
vote
1 answer

Using immersive mode only on landscape mode

I try make app that will go to immersive mode on landscape (without status bar and navigation bar) and disable immersive mode on portrate (with return status bar and navigation bar). Without restart activity (onCreate called only one time). I wrote…
1
vote
0 answers

How to prevent user from clicking Navigation buttons in Android

I have encountered a problem where user will exit my application accidentally. I know Android is preventing to block use of these buttons, because you should always be able to exit your app somehow but I am creating an app for blind and visually…
1
vote
1 answer

Status and navigation bar showing when scrolling Recycler view in immersive mode

I'm implementing immersive mode using this code: activity.getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |…
Sid Go
  • 2,041
  • 3
  • 16
  • 29
1
vote
0 answers

Android full screen - immersive mode activity inward swipe doesn't work

I'm trying to implement an activity with full screen, called immersive mode too. On android documentation I read: "When immersive full-screen mode is enabled, your activity continues to receive all touch events. The user can reveal the system bars…