首页 > 解决方案 > 几乎不可能在 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}
          />

标签: androidreact-native

解决方案


我曾经遇到过类似的问题,并通过从样式中删除填充来解决它。

希望它对您也有帮助,如果没有,请提供照片或详细说明您面临的问题。


推荐阅读