React native 选中复选框时对本机文本组件移动作出反应
当选中此复选框时,相邻文本会随着复选框像素数的扩展而略微向右移动。鉴于“位置”属性在本机中的限制。它如何阻止这种情况发生React native 选中复选框时对本机文本组件移动作出反应,react-native,checkbox,text,React Native,Checkbox,Text,当选中此复选框时,相邻文本会随着复选框像素数的扩展而略微向右移动。鉴于“位置”属性在本机中的限制。它如何阻止这种情况发生 <View style={this.props.checkBoxWrapper}> <CheckBox title={''} checked={this.state.checkedNews} onPress={() => this.setState({ checkedNews:!this.state.checke
<View style={this.props.checkBoxWrapper}>
<CheckBox
title={''}
checked={this.state.checkedNews}
onPress={() => this.setState({ checkedNews:!this.state.checkedNews })}
containerStyle={this.props.checkboxContainerStyle}
checkedColor='white'
/>
<Text style={this.props.checkBoxTextStyle}>
{I18n.t(this.props.labels.checkBoxNewsDialog)}
</Text>
</View>
this.setState({checkedNews:!this.state.checkedNews})}
containerStyle={this.props.checkboxContainerStyle}
checkedColor='white'
/>
{I18n.t(this.props.labels.checkBoxNewsDialog)}
假设您使用的是本机复选框,则不应出现这种情况,因为您的样式可能有问题。尝试删除containerStyle
,以及什么是checkedColor
prop?原生复选框元素没有任何这些道具