我在scrollview中使用了Web视图。因为向下交换屏幕时需要刷新Web视图。但是向下交换时总是刷新页面。我只需要刷新页面的顶部即可。
<ScrollView
refreshControl={
<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this._onRefresh}
/>
}
scrollEnabled={false}
<Spinner
visible={this.state.visible}
textContent={'Loading...'}
color={'blue'}
/>
<WebView
style={{
marginTop: 0,
height: 600,
}}
startInLoadingState={false}
enableNavigate={false}
ref={(ref) => this.myWebView = ref}
source={{uri: }}
onLoadStart={() => (this.showSpinner())}
onLoad={() => (this.hideSpinner())}
domStorageEnabled={false}
scalesPageToFit={true}
>
</WebView>
</ScrollView>
</View>