实际上,我使用的是 react-native-element 设计语言。当我用来实现复选框时,它的行为就像我不想要的可触摸不透明度。
<CheckBox
containerStyle={{ backgroundColor: "transparent", borderWidth: 0 }}
center
size={14}
title="vegetarian"
textStyle={{
fontSize: theme.FONT_SIZE_X_SMALL,
fontWeight: theme.FONT_WEIGHT_LIGHT
}}
checkedColor="red"
checked={this.state.checked}
onPress={() => this.setState({ checked: !this.state.checked })}
/>;