【发布时间】:2020-07-22 06:43:33
【问题描述】:
在我的 react native 应用程序中,我有一个 webview,在里面我有 4 个文本字段,所以当我关注最后一个文本输入时,键盘与最后一个文本字段重叠,不会自动滚动下面是 m 代码
render() {
return (
<View style={styles.mainView} >
<WebView
ref={r => this.webview = r}
style={{width:globals.screenWidth, height:globals.screenHeight}}
bounces={false}
style={{ flex: 1 }}
startInLoadingState
scalesPageToFit
javaScriptEnabledAndroid={true}
javaScriptEnabled={true}
domStorageEnabled = {true}
onNavigationStateChange={this.handleNavigationStateChange}
onLoadStart={() => {
}}
onLoadEnd={() => {
}}
source={{uri: this.state.url}}
onError={(error) => this.onError()}
/>
</View>
);
}
所以任何想法我该如何解决这个问题你的所有建议都是可观的
【问题讨论】:
-
你能分享完整的代码吗?
标签: android react-native webview