-
Notifications
You must be signed in to change notification settings - Fork 180
Doesn't work in landscape? #4
Comments
Sometimes the measurement is inaccurate from onLayout. If you know a View is always going to touch an edge of the screen, but SafeAreaView is not adding padding automatically, use |
Unless I misunderstood your question. Padding gets added to top and bottom edges when in portrait and left and right edges in landscape. |
I was thinking that this component would have added padding also for the status bar |
It does add padding for the status bar. Can you share a screenshot and code that shows the problem you’re having? |
It doesn't add padding on iOS 10 and earlier. |
I just add the view with inside some text and I reproduce the problem. |
What device is this on? Can you share a screen shot? |
I believe this is what he is talking about with the use of react navigation: I've been actually debugging to see if it is just a missed setting, bad code or an actual bug. In portrait there is automatic padding at top for older iphone with safeareaview but when you rotate to landscape the status bar is hidden but if you swipe down to show status bar it then displays it and the bar remains there after closing, overlapping the header (see time/battery icons in landscape image) It may be related to facebook/react-native#18005 as the iOS status bar gets hidden by default. So if on load the iOS status is not there and no padding is added but then you swipe down for notifications, the bar is then displayed and does not go away resulting in overlap. |
this should be resolved in version 1.0 which was released today, thanks for reporting! |
It looks like this component doesn't add any padding in landscape, but this is going to allow elements to be rendered below the status bar.
Am I missing something maybe?
The text was updated successfully, but these errors were encountered: