当我点击输入并开始输入时,android 中的 TextInput 不工作,没有文本显示为输入。我在 android 8.1 和 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>
);
}
}
最佳答案
我们可以给 padding: 0;
。
对我来说它工作正常。
关于android - TextInput 在 android 中不起作用 react native ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50317504/