【发布时间】:2020-12-13 13:30:16
【问题描述】:
我有 <WebView> 嵌入在 <Card.Content> 中,因为我正在使用 react-native-paper。我试图让WebView 可滚动。 webview 显示但不可滚动。
我正在使用的代码:
<Card theme={{ roundness: 20 }} style={{ margin: 10, height: height*0.8 }} elevation={14}>
<Card.Content style={{ flex: 1 }}>
<View style={{ justifyContent: "center", alignItems: "center" }}>
<WebView
style={{ width: width * 0.8, height: height * 0.9 }}
allowsBackForwardNavigationGestures={false}
source={{ uri: "https://paypal.com"}}
pullToRefreshEnabled={false}
javaScriptEnabled
startInLoadingState
decelerationRate="normal"
scalesPageToFit={Platform.OS == "android"? false : true}
originWhitelist={['*']}
domStorageEnabled={true}
scrollEnabled
renderError={e => { console.log(e); }}
/>
</View>
</Card.Content>
</Card>
如何使WebView 可滚动?
【问题讨论】:
标签: android ios react-native react-native-webview react-native-paper