Replies: 3 comments 1 reply
-
@peterpme Hello! I'm trying to reproduce, but not sure how. Can you reduce the issue to the minimum amount of code possible? |
Beta Was this translation helpful? Give feedback.
-
Hey @zoontek !! I was able to put together a minimal recreation here: As you can see from the screenshots, as soon as I enable it, there is extra padding. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@peterpme Just checked it, it appears there's no need for const topInset =
isParentHeaderShown || // false
(Platform.OS === 'ios' && isModal) || // false
(isIPhone && isLandscape) // false
? 0
: insets.top; // so topInset = safe area insets.top const headerTopInsetEnabled =
typeof statusBarTranslucent === 'boolean' // false
? statusBarTranslucent
: topInset !== 0; // true, so headerTopInsetEnabled = true Sources: There's no need to set function NavLayout({ children }) {
- const insets = useSafeAreaInsets();
- return <View style={{ flex: 1, paddingTop: insets.top }}>{children}</View>;
+ return <View style={{ flex: 1 }}>{children}</View>;
} Works on iOS and Android: ![]() ![]() Note that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Using the following:
On Android, when I build with react-native-edge-to-edge, I'm getting a ton of extra padding. This only appears if I'm using edge-to-edge. Otherwise the padding is gone. There is no problem on iOS. See left vs. right.
As soon as I remove edge-to-edge, everything continues to work as intended. Has anyone run into this problem? Am I doing something wrong?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions