我使用React Native的Keyboard Avoiding View,其行为设置为填充(在Android上测试)。React Native KeyboardAvoidingView涵盖上一次输入的文字
我的屏幕上有多个TextInputs。当我点击最终的TextInput时,键盘覆盖它。由于从KeyboardAvoidingView添加了填充,因此我现在可以向下滚动,但它会自动滚动焦点,是理想选择。
<Content>
<KeyboardAvoidingView behavior='padding'>
<TextInput placeholder='Example 1' />
<TextInput placeholder='Example 2' />
<TextInput placeholder='Example 3' />
<TextInput placeholder='Example 4' />
<TextInput placeholder='Example 5' />
<TextInput placeholder='Example 6' />
<TextInput placeholder='Example 7' />
</KeyboardAvoidingView>
</Content>
谢谢,@Maxwelll。我对此没有任何运气。你能举一个例子吗? –