android - React Native 的 KeyboardAvoidingView keyboardVerticalOffset 与 textinput 上的下划线重叠
问题描述
我正在使用 keyboardVerticalOffset 以便在显示键盘时适当地向上移动内容。它运行良好,但是当显示键盘时,下划线被掩盖了。
如果我增加keyboardVerticalOffset 值,它只会在输入下方添加空白,您仍然看不到下划线。
<KeyboardAvoidingView
style={{
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
backgroundColor: '#fff'
}}
behavior="padding"
keyboardVerticalOffset={90}
enabled>
ScrollView
style={{backgroundColor: '#fff'}}
keyboardShouldPersistTaps='always'>
<Content style={globalStyles.content} keyboardShouldPersistTaps='always'>
<Form>
{this.renderInspectionDetails()}
{this.renderClientInformation()}
{this.renderBuyersAgentDetails()}
{this.renderSellersAgentDetails()}
{this.renderNotes()}
</Form>
</Content>
</ScrollView>
</KeyboardAvoidingView>
下图显示了一个文本输入焦点。
解决方案
推荐阅读
- android - 如何在地图内找到附近的码头、码头和船只发射点?
- java - 如何在魅力报告中附加自定义/现有屏幕截图?
- typescript - 如何在单元测试中模拟 TS 类
- php - PHPSpreadhseet:从我的数据库导出数据时没有得到输出,甚至没有一个错误?
- spring-security - 使用 Google OAuth 实现 Spring 安全性并生成自定义令牌
- javascript - 视差冻结浏览器
- ios - 用于快速发送和接收 json 数据的相同结构
- android - 如何以编程方式创建带有子项的操作项?
- php - 我无法将变量从我的 PHP 文件传递到我的 Smarty 文件
- python - 如何防止您的免费层 heroku 应用程序闲置(python/django)