Insets of system views (e.g. status bar, navigation bar), that are applied to the window of activity.
Questions tagged [windowinsets]
70 questions
1
vote
1 answer
How to enable and disable full screen mode using WindowInsets?
I have 2 functions, which help me to enable and disable full-screen mode in my app. By default, my app is not in full-screen mode. The behavior that I want is when the user opens a fragment, after 5 seconds I enable full-screen mode. When the user…

Hayk Mkrtchyan
- 2,835
- 3
- 19
- 61
1
vote
2 answers
windowInsetsController vs windowInsetsControllerCompat? I can only access the former
So i was watching this tutorial by google today here https://youtu.be/jal0l48OTxk and i figured that doing
myCanvasView.systemUiVisibility = SYSTEM_UI_FLAG_FULLSCREEN
is now deprecated and i need to use windowInsetsController instead. First…

Sbeve
- 91
- 2
- 16
1
vote
0 answers
Android - WindowInsetsController in Fragment destroys the whole view
I have a Fragment for taking a picture and I wanted to have it in full screen mode. Until API 30, I used the flags as described in the official docs here.
But after upgrading the version of my project to 30, Android Studio tells that the flag are…

abdullah celik
- 511
- 1
- 6
- 17
1
vote
0 answers
How do Window Insets get consumed, what does consuming mean exactly for insets?
With a layout as the one below

Thracian
- 43,021
- 16
- 133
- 222
1
vote
1 answer
how to use the windowinsetsanimation in Android 11 (Android R or Android API level 30)
The new Android version (Android 11) added new set of APIs let you synchronize your app’s content with the IME (input method editor, aka soft keyboard) and system bars as they animate on and offscreen, making it much easier to create natural,…

Darish
- 11,032
- 5
- 50
- 70
1
vote
2 answers
Android transparent status bar and custom view insets
I want to draw my layout behind transparent status bar.
I'm using conductor's controllers for implementing my app's screens, all of them have white status bar but one need it to be fully transparent. I can't use windowTranslucentStatus flag when…

Olexii Muraviov
- 1,456
- 1
- 12
- 36
1
vote
1 answer
Determine content area without navigation bar and status bar
An Android app uses full screen showing content behind the navigation bar, status bar, and toolbar. I'd like to have some contents not behind these bars. How to determine the area without these bars? As my understanding, the locations of some bars…

Hong
- 17,643
- 21
- 81
- 142
1
vote
1 answer
Status Bar is overlapping in Tab Layout in Android
The Tab Layout is overlapping with the status bar, I found a couple of threads having the same thing, but the solution seems to be adding "fitsSystemWindows" and I've already set it in my XML layout, the strange thing is I have more tabs like this…
user8030578
0
votes
0 answers
Android FAB not respecting WindowInsets in edge-to-edge xml layout with Navigation Component
My goal is to have an app layout that has a fairly constant navigation UI with various content screens.
So my idea was to use the android architecture navigation component and host an FragmentContainerView for the varying screens (fragments) in the…

citizen_code
- 81
- 5
0
votes
1 answer
CollapsingToolbarLayout scroll not work after setAppearanceLightStatusBars on API 26
I create simple ScrollingActivity (which created by new Android template) it's working fine while scrolling

Linh
- 57,942
- 23
- 262
- 279
0
votes
0 answers
Kotlin Type Mismatch Required: WindowInsetsController? Found: Int
I am very very new to Android Studio. I am trying to remake my game from Godot in Android Studio.
I am getting this error in the fullscreenActivity.kt: Type Mismatch Required: WindowInsetsController? Found: Int. I'm not really sure whats going on.…
0
votes
1 answer
Can a Compose LazyList be scrolled to adjust for keyboard?
I have been wrestling with IME padding/adjustment for my app. I have written a little toy app to try and focus on just the problem. The app presents a scrollable list of cards with info on them, the name is a simple BasicTextField. The code is at…

Travis Griggs
- 21,522
- 19
- 91
- 167
0
votes
0 answers
Android WindowInsets API: how to achieve View.SYSTEM_UI_FLAG_LOW_PROFILE behavior?
I want to make the navigation icons (bar) dim, because they are to bright and distract the user from the application content. At the same time I don't want to hide the navigation bar completely. The description of View.SYSTEM_UI_FLAG_LOW_PROFILE…

frumle
- 593
- 5
- 15
0
votes
1 answer
Compose BottomNavigation padding
Im trying to properly apply a bottom window inset on the BottomNavigation composable. I have an edge to edge scaffold it looks like that:
When using:
modifier.navigationBarsPadding()
On the bottom navigation im getting the following:
I'm trying…

Evgeni Roitburg
- 1,958
- 21
- 33
0
votes
0 answers
What's the proper way to replace manifest flag `android:windowSoftInputMode="adjustResize"` with insets API?
If I understood correctly, we can replace manifest flag android:windowSoftInputMode="adjustResize" with insets api.
My theme contains flags:
- @android:color/transparent
-

Pavel Mokshanov
- 67
- 5