Hi everyone! I'm having a curious problem with com...
# compose
n
Hi everyone! I'm having a curious problem with compose. LocalConfiguration.current.screenHeightDp by default returns the dimension of the available screen, excluding system bars. It seems that with some devices, like Pixel C for example, it ignores the bottom system bar, returning the height of the screen comprehensive of the bottom bar height. Do you know if there's a way to avoid this weird behaviour with system bars such as Pixel's one?
a
Is there an alternate way to place the green icon using a relative placement from the bottom of the screen? I'd generally avoid using
LocalConfiguration.current.screenHeightDp
as part of a calculation to place components. There's two reasons for that: • the only time
LocalConfiguration.current.screenHeightDp
might be valid to use is at the very top level of your hierarchy, where you assume that your UI is taking up the entire space • As you are running into,
LocalConfiguration.current.screenHeightDp
isn't necessarily the window size, as it can be smaller than the overall window size by an amount of insets (both top and bottom bars), but insets can also change dynamically (taskbar showing and hiding, changing gesture navigation modes)