简体   繁体   English

在React Native Android中几乎不可能集中TextInput

[英]Almost impossible to focus TextInput in React Native Android

I'm using React Native TextInput on Android. 我在Android上使用React Native TextInput。 The problem is that you have to press it multiple times for it to work .. and I also noticed that sometimes the cursor blinks once (as if it worked and the keyboard is going to appear) but then it disappears and nothing happens 问题是您必须多次按下它才能工作..而且我还注意到有时光标会闪烁一次(就像它正常工作并且将要出现键盘一样),但是随后消失并且什么也没有发生

<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}
          />

I had similar issue once and solved it by removing the padding from style. 我曾经有过类似的问题,并通过删除样式中的填充来解决。

Hope it helps to you too,also if doesn't please provide a photo or details on what the problem is which you are facing. 希望它也对您有帮助,如果没有提供帮助,请提供照片或详细信息说明您面临的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM