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
0 answers

Flutter: I enabled the immersive mode and the AppBar stays big. When I make it smaller the title becomes cropped and does not go up with the AppBar

The image above shows how I enabled the immersive mode. This is how the AppBar looks without any modification. And this is how it looks like, when I set the toolbarHeight to 10. Here is the code from the image: class _MyHomePageState extends…
Zeynep
  • 11
  • 2
1
vote
0 answers

How to show ActionBar when exit full screen by swipe down?

mContext.getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |…
neobie
  • 2,847
  • 5
  • 27
  • 31
1
vote
0 answers

Trying to set fullscreen, Android dialog.getWindow().setLayoutParams() doesn't work with view.setPadding()

I'm trying to have an immersive view implemented for a dialogfragment, and not having an expected behavior happening. Here's part of my code in onViewCreated(view, Bundle…
1
vote
2 answers

How to hide the status bar and draw on it

I know it sounds duplicate but it is not. I have read a whole article about implementing what I want at android studio official site but no help. My goal is to draw behind the system bars like this photo: ( I also want the hide the system bars which…
1
vote
0 answers

Android: How to get visibility status of immersive navigation bar

I have an exotic task and for it I need to know when the immersive bottom navbar is displayed and when it is hidden. Is there any callback for this in the Android SDK?
ByMedion
  • 21
  • 4
1
vote
1 answer

Jetpack Compose beta cannot go edge-to-edge due to overriding fitsSystemWindows

I have upgraded Compose for my app from 1.0.0-alpha10 to current latest of 1.0.0-beta03 I want to layout my activity contents edge to edge, underneath system bars. Among other things I have used the below code to tell the system this…
Madushan
  • 6,977
  • 31
  • 79
1
vote
0 answers

Run the same ADB Shell script on multiple emulators running simultaneously

While running automated UI tests with multiple workers I would like to execute the following script: beforeAll(async () => { if (device.getPlatform() === 'android') { console.log('*** disable android system popups ***') …
1
vote
1 answer

How to enable immersive mode on landscape orientation

I'm showing Google Map on my application. I want it to look immersive so I added this line. WindowCompat.setDecorFitsSystemWindows(window, true) There is nothing wrong on portrait mode with this line of code but I want full immersive…
yasincidem
  • 51
  • 2
  • 7
1
vote
2 answers

Immersive mode activity transition

I've successfully set the app in the immersive mode because I want to hide the status bar (on the top screen) and the navigation bar (on the bottom screen). The problem is that when the activity changes the bottom bar automatically arise and…
newUser.java
  • 197
  • 1
  • 3
  • 12
1
vote
0 answers

Android: How to access the notch Area for displaying app content?

I have a phone with a notch. When I want my activity to go full-screen, the notch area is inaccessible, it becomes black. Navigation bar goes away normally. I have seen other apps also cannot access the notch area, both sides of notch just…
q126y
  • 1,589
  • 4
  • 18
  • 50
1
vote
0 answers

React Native how to have a immersive modal

I have an app which is immersive on android but when I open a Modal the android navigation appears.From what I've searched the Dialog for Modal should have some flags to make it immersive.
1
vote
1 answer

Immersive Mode with toolbar

I am trying to enter in immersive mode using View decorView = getActivity().getWindow().getDecorView(); decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION …
ingsaurabh
  • 15,249
  • 7
  • 52
  • 81
1
vote
1 answer

Declare fullscreen and immersive app in manifest

I have this styles.xml then use this as the theme for my…
user1506104
  • 6,554
  • 4
  • 71
  • 89
1
vote
0 answers

Temporarily Showing the Navigation and Status bars in Immersive Mode

In Android when in Immersive Mode, swiping in from the bottom or other edges (based on current orientation) reveals the status bar and navigation bar (which auto-hides later). I want to trigger this programmatically by touching the fingerprint…
Divyansh Goenka
  • 997
  • 2
  • 12
  • 35
1
vote
0 answers

UI Elements are not visible in Fullscreen mode

I'm trying to view a ImageButton (play and pause) when a video is shown in fullscreen mode of Google VR, but they are not visible. The button is visible only in non-fullscreen mode. The things I've tried: Add the view after the fullscreen mode is…
SO1992
  • 127
  • 1
  • 13