【发布时间】:2020-07-20 04:22:40
【问题描述】:
我正在我的 react-native-webview 应用程序的 react-native-webview 中加载一个网页。在 iOS 中,一切正常,我可以向下滚动网页。但问题正在Android中发生。它不允许滚动网页。这是我的代码
<WebView
style={{
height:1000,
flex: 1,
fontFamily:'TitilliumWeb-SemiBold',
color:'#38c654',
fontSize:15,
width:'100%',
marginTop:5,
backgroundColor:'transparent',
}}
originWhitelist={['*']}
scalesPageToFit={true}
javaScriptEnabled={true}
domStorageEnabled={true}
startInLoadingState={true}
renderLoading={() => {
return this.displaySpinner();
}}
source={{
uri: URLLink
}}
/>
之后,我用谷歌搜索并找到了另一个库 react-native-autoheight-webview。我也使用了它,但我仍然无法在 Android 中滚动网页。对此的任何解决方案都会有很大帮助。
【问题讨论】:
标签: html react-native webview