TextInput not working in android react native

TextInput in android is not working when i click on the input and start typing, no text is shown as input. I tested it on android 8.1 and 7.1.

react-native-cli : 2.0.1 react-native : 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>
        );
    }
}

Solution 1:

Try doubling the height of the text input style. I was having the same issue, and doubling the height to 40 fixed it for me. Seems to be an issue with android specifically.

Where I found this solution

Solution 2:

We can give padding: 0;. For me its working fine.