android - 几乎不可能在 React Native Android 中关注 TextInput
问题描述
我在 Android 上使用 React Native TextInput。问题是您必须多次按下它才能工作..而且我还注意到有时光标会闪烁一次(好像它工作并且键盘会出现)但随后它消失并且没有任何反应
<TextInput
style={{
fontFamily: 'greycliff-cf-regular',
fontSize: 14,
height: 32,
paddingTop: 0,
marginTop: 6,
flex: 1,
color: '#fff',
}}
underlineColorAndroid="transparent"
autoCorrect={false}
onChangeText={this.onChangeText}
placeholder={'some text'}
value={this.state.currentInput}
/>
解决方案
我曾经遇到过类似的问题,并通过从样式中删除填充来解决它。
希望它对您也有帮助,如果没有,请提供照片或详细说明您面临的问题。
推荐阅读
- yii - 如何将表单生成器的表单保存到数据库
- python - one-hot 编码的 Keras CNN 输出不如预期
- android - 为什么只有 val 类型的对象在 kotlin 中才有组件函数?
- html - 重定向时影响主窗口历史记录的 iframe
- sql - Visual Basic 2010 数据库中的 DBNull 异常
- reactjs - 在同一级别的 key-prop-problem 上反应多个映射
- r - 使用变量对 data.table 进行子集化(当 varname 与 colname 相同时)
- html - 如何使子div高度与父div高度相同
- perl - 使用 perl 脚本在目录中搜索文本模式
- java - 找不到 ComboPooledDataSource 的类型