TextInput 无法在 android React Native 中工作

Nam*_*ngh 2 android react-native

当我单击输入并开始输入时,Android 中的 TextInput 不起作用,没有文本显示为输入。我在android 8.1和7.1上测试过。

反应本机-cli:2.0.1 反应本机:0.55.4

class LoginForm extends Component{
    state={text: ''};
    render(){

        return(
            <Card>
                <CardSection>
                    <TextInput
                        value={this.state.text}
                        onChangeText={(text)=>this.setState({text})}

                        style={{height: 20, width: 1.0}}
                    />
                </CardSection>
                <CardSection/>

                <CardSection>
                    <Button>Log In</Button>
                </CardSection>
            </Card>
        );
    }
}
Run Code Online (Sandbox Code Playgroud)

小智 5

我们可以给予padding: 0;。对我来说它工作正常。