Closed pesseyjulien closed 1 year ago
Do you have a safe area provider at the top of your app?
I’ll close this ticket because it’s not a bug but I’ll still provide you with pointers
thanks and no SafeArea.
My main.js :
render() { return <MyWebView/> }
My WebView.js :
render() {
return (
<SafeAreaView edges={this.edges()} style={this.safeViewStyle()}>
<StatusBar barStyle={this.barStyle()} backgroundColor={this.barColor()} />
{(this.state.renderLoading) ? <LoadingView/> : false}
<UpdateNotice />
<OfflineNotice />
{
(this.state.canGoBack)
? <View style={styles.container}>
<View style={styles.items}>
<TouchableOpacity style={{position: 'absolute', left: 5}} onPress={this.onBack.bind(this)}>
<Icon name="arrow-back" size={30} color="#000" />
</TouchableOpacity>
</View>
<View style={styles.items}>
<TouchableOpacity style={{position: 'absolute', right: 5}} onPress={this.onOpen.bind(this)}>
<Icon name="launch" size={25} color="#000" />
</TouchableOpacity>
</View>
</View>
: false
}
<View style={{height: 5}} >
<ScrollView
style={{
flex: 1,
height: '100%',
//backgroundColor: 'red'
}}
//scrollEnabled={false}
onLayout={e => {
this.setState({ scrollViewHeight: e.nativeEvent.layout.height })
}}
refreshControl={
<RefreshControl
refreshing={false}
enabled={this.state.isPullToRefreshEnabled}
onRefresh={this.onRefresh}
tintColor="transparent"
colors={["transparent"]}
style={{ backgroundColor: "transparent" }}
/>
}
>
</ScrollView>
</View>
<WebView
source={{uri: this.state.url}}
style={WEBVIEW(this.state.scrollViewHeight)}
..
/>
</SafeAreaView>
)
}
All good, working with :
Main.js
render() {
return (
<SafeAreaProvider>
<MyWebView/>
</SafeAreaProvider>
)
}
Thanks again !
Hi,
I tried to upgrade the package from 3.4.1 to 4.1.2, I read the breaking changes and it seems like there wasn't any big changes but after the upgrade, it seems to be broken.
Before (3.4.1) :
After (4.1.2) :
Code :
Any idea what I might be missing ?
Thanks in advance for your help, Julien