我正在使用React Native的TextInput组件。在此,如果用户单击textInput字段,则需要显示InputBox在键盘上方。
我尝试过以下方法,但我遇到了问题
1. 键盘避免视图(Keyboard avoiding view)
a. Here it shows some empty space below the input box
b. Manually I need to scroll up the screen to see the input field which I was given in the text field
c. Input box section is hiding while placing the mouse inside the input box
2. react-native-Keyboard-aware-scroll-view
a.It shows some empty space below the input box
b.ScrollView is reset to the top of the page after I moving to the next input box
我在ScrollView组件中设置了Keyboard-aware-scroll-view。
请说明一下。
我的示例代码如下:
<SafeAreaView>
<KeyboardAvoidingView>
<ScrollView>
<Text>Name</Text>
<AutoTags
//required
suggestions={this.state.suggestedName}
handleAddition={this.handleAddition}
handleDelete={this.handleDelete}
multiline={true}
placeholder="TYPE IN"
blurOnSubmit={true}
style= {styles.style}
/>
</ScrollView>
</KeyboardAvoidingView>
</SafeAreaView>
[https://github.com/APSL/react-native-keyboard-aware-scroll-view]
<View>
标签移除,只在<KeyboardAvoidingView>
外面放置一个标签吗? - kenmistry