react-native-unistyles: Incorrect bottom inset (Android)
Description
Unistyles runtime incorrectly reports insets.bottom
as 0
. insets.top
appears to work corrrectly.
This occurs both when calling the runtime directly and when calling the createStyleSheet runtime param
Steps to reproduce
- Use Android device with bottom safe area (e.g. Pixel 7 Pro)
- Compare
useSafeAreaInsets()
toUnistylesRuntime.insets
Snack or a link to a repository (optional)
https://snack.expo.dev/@haydenbriese/graceful-blue-sandwich
Unistyles version
2.7.1
React Native version
0.73.6
Platforms
Android
Engine
Hermes
Architecture
Paper (old)
About this issue
- Original URL
- State: closed
- Created 2 months ago
- Comments: 15 (10 by maintainers)
Thanks guys, please stay at 2.7.1. I need to rethink expo status bar support
Thanks guys! I will check the repro and try to patch it ๐
Hi, I noticed a regression on low-end Android device (Alcatel 1B with Android 10) in bare react-native.
const { bottom } = useSafeAreaInsets // 0
โruntime.insets.bottom // 0 unistyles@2.7.1
โruntime.insets.bottom // 48 unistyles@2.7.2
โญAll works! Thanks for the quick fix ๐
@jpudysz Thanks for creating such an amazing library!
Like the above comments have already mentioned, even weโve been seeing that bottom inset from UnistylesRuntime always returns 0. And we are not setting NavigationBar position to absolute. Interestingly, even useSafeAreaInsets returns bottom inset as 0. Not sure what weโre missing though.
Tested Devices
Unistyles Version
2.7.1
Platform
Android