Open federicoparroni opened 4 years ago
Hey 👋 Thank you for reporting an issue. Can you try to remove childrenWithOverriddenStyle in your node_modules ?
No, that happens also after having removed childrenWithOverriddenStyles :/
Is there any news regarding to this issue? :(
@keyblade95, you can bypass problem by removing absolute layout and setting negative margin on element which will be in front.
I don’t know if I understood well.. should I remove the absolute layout from the SafeArea child view? Can you provide a minimal example, please?
Can you try style={{width: "100%", height:"100%"}}
instead of flex:1
?
Additional, can you use SafeArea
instead of Fragment
? ViewPager
's parent here is fragment, so view inset can be wrong setup. Please add backgroundColor: "pink"
and check the safe area for this view
I cannot use SafeArea as the top parent because I want to achieve the following effect: the ViewPager pages have a background image and I want that to cover the entire screen. So, I set the pages to be fullscreen and the footer to be inside the safe area.
Anyway, I will try style={{width: "100%", height:"100%"}}
as soon as possible.
@keyblade95 , in your footer, remove absolute
in style, and then add marginTop: -50
for example. That will do the job.
<SafeAreaView>
<View style={{marginTop: -50}}>
<View style={styles.footer}>
<View style={styles.footerSubContLeft}>
<Button title="Home" color='black' onPress={() => {}} />
</View>
<View style={styles.footerSubContRight}>
<Button title="Next" color='black' onPress={() => {}} />
</View>
</View>
</View>
</SafeAreaView>
Is there any news to this?
I still have this issue on iOS in 2022. Was there any solution?
Bug report
Summary
As you can see from the screenshot, the safe area is computed wrongly when a view with
position: absolute
is placed near the view pager.Environment info
react-native info
output:Library version: "^4.0.0",
Steps to reproduce
Describe what you expected to happen:
The text view should be inside the SafeArea. If I remove the yellow view (footer), this is respected.