你好,我是新来回应本机,我遇到了视图问题。我在输入文本时遇到问题,因为它只显示非常小。当我 删除样式表中的容器所有文本消失,文本输入变大。
这是我的代码
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Double tap R on your keyboard to reload,{'\n'}
Shake or press menu button for dev menu
</Text>
<View>
<View style ={styles.textinput}>
<TextInput
keyboardType='ascii-capable'
placeholder='First Name'
value={this.state.firstName}
onChangeText={(text) => {this.setState({firstName: text})}}/>
<TextInput
keyboardType='ascii-capable'
placeholder='Middle Name'
value={this.state.middleName}
onChangeText={(text) => {this.setState({middleName: text})}}/>
<TextInput
keyboardType='ascii-capable'
placeholder='Last Name'
value={this.state.lastName}
onChangeText={(text) => {this.setState({lastName: text})}}/>
<TextInput
keyboardType='ascii-capable'
placeholder='Email'
value={this.state.email}
onChangeText={(text) => {this.setState({email: text})}}/>
<TextInput
keyboardType='ascii-capable'
placeholder='Address'
value={this.state.address}
onChangeText={(text) => {this.setState({address: text})}}/>
</View>
<View style={styles.buttonModal}>
<Button
style={styles.cancelButton}
onPress={this.editUser}
title="SAVE"
color="#343434"
accessibilityLabel="Save user."/>
</View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
textinput: {
flex: 0,
},
buttonModal: {
paddingTop: 20,
flexDirection: 'row',
justifyContent: 'space-around'
},
});
答案 0 :(得分:0)
删除input$percentInTrain
上方的 testidx <- sample(1:nrow(dt), length(1:nrow(dt)*input$percentInTrain))
rvtrain <- dt[testidx,]
rvtest <- dt[-testidx,]
并制作
<view>
按钮,尝试逐个评论<View style ={styles.textinput}>
。