Insets of system views (e.g. status bar, navigation bar), that are applied to the window of activity.
Questions tagged [windowinsets]
70 questions
0
votes
0 answers
Android Compose WindowInsets lost when not in foreground
I'm working on a single activity full compose app and I'm using Modifier.systemBarsPadding() to add systembar padding to my app and it works with no issues at att all while navigation though the app. But I noticed that when I call for an intent…

Erazx
- 71
- 1
- 2
- 7
0
votes
1 answer
How to play video in fullscreen in landscape with ExoPlayer?
I am trying to play with ExoPlayer in fullscreen in landscape mode.
So far I have done all things and thought this looks perfect until then I noticed something and want to explain with these image screens below.
This is Android 11 and currently, I…

ShaRy
- 59
- 10
0
votes
1 answer
ViewCompat.setOnApplyWindowInsetsListener is only called on some devices?
I'm trying to display my app edge-to-edge but results are not even consistent across devices. ViewCompat.setOnApplyWindowInsetsListener is called on Pixel 4a/5 but not on Pixel 3 XL and Essential PH-1, the app just draws behind the status bar when I…

imashnake_
- 171
- 9
0
votes
2 answers
Android 11 Full screen with Coordinator layout status bar spacing issue
I am facing an issue with the full-screen immersive mode in Android 11. My Main activity layout file look something like this,
…

Madhan
- 361
- 4
- 17
0
votes
1 answer
WindowInsets vs InputMethodManager!! Right way to show and hide softkey in android
What should i use; WindowInsets or InputMethodManager to show and hide the soft keyboard in android? Which is the right way of doing the cited task, without compromising the app performance?
I want the keyboard show and hide to be smooth.

RAJESH SAHU
- 94
- 4
0
votes
1 answer
How to use WindowInsets API (Compat version) to show/hide keyboard?
I'm playing with WindowInsets API to opening/hiding keyboard, but it seems to doesnt work with Compat version (target API 29) or something.
fun View.hideKeyboard() {
…

khoben
- 108
- 1
- 8
0
votes
2 answers
ViewPager2 OnApplyWindowInsetsListener not called
I have a FAB on a Fragment in a ViewPager2 which should respect the window insets when going edge-to-edge. I'm adding a OnApplyWindowInsetsListener on the FAB which updates its margin. This works fine when using the old ViewPager.
When updating to…

hardysim
- 2,756
- 2
- 25
- 52
0
votes
1 answer
WindowInset with Fragment Shared Element Transition
I am trying to add a shared element transition to my fragment which will create something like a centered logo to top. I did this successfully with shared element transition but the logo also applies some window inset. The problem in that only after…

Archie G. Quiñones
- 11,638
- 18
- 65
- 107
-1
votes
1 answer
setOnApplyWindowInsetsListeners invoked only setDecorFitsSystemWindows(window, false) but toolbar goes inside status bar in android
i am new to android i am facing issue when i have to control of window inset to check the keyboard visibility status,,when i tried using
viewBinding.etAmount.setOnApplyWindowInsetsListener { v, insets ->
if…

Mohanapriya
- 19
- 3
-1
votes
2 answers
Xamarin (Android): Detect if the device has a display notch or not
I'm trying to detect if the device my app is running on has a notch or not.
This has what I need but I'm not been able to find the Xamarin equivalent for getDisplayCutout() in the WindowInset class.

Jay Sidri
- 6,271
- 3
- 43
- 62