gpt4 book ai didi

android - TextInput 在 android 中不起作用 react native

转载 作者:行者123 更新时间:2023-12-01 22:08:08 24 4
gpt4 key购买 nike

当我点击输入并开始输入时,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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com