How to determine in my fragment that in activity enabled edge-to-edge with function
WindowCompat.setDecorFitsSystemWindows(window, false)
Any ideas?
Is it possible to get the value of WindowCompat.setDecorFitsSystemWindows(window, false)?
How to determine in my fragment that in activity enabled edge-to-edge with function
WindowCompat.setDecorFitsSystemWindows(window, false)
Any ideas?
Is it possible to get the value of WindowCompat.setDecorFitsSystemWindows(window, false)?
There's no public API to query this state. You might need to manage this state in your app, perhaps by setting a flag when you enable edge-to-edge and then checking that flag in your fragment instead?
Alternatively you might try to deduct that from system UI visibility flags:
But that would require use of reflection which can be risky because it might not work across different Android versions or devices and can break in future Android updates, so I do not recommend going that way if use of own flag suffices.