The iOS Radio Button is invisible while unchecked, being extremely hard to even notice it is a Radio Button.
While I found out that this behaviour follows the guidelines for iOS, I would like to have the option available to choose between following the native behaviour for each of them or to enforce one of them.
In this case, enforce the Android Radio Button for both platforms.
renderOptions(options) {
const radioButtons = options.map((el) =>
<View key={el.type} style={styles.radioContainer}>
<Text style={styles.radioText}>{el.description}</Text>
<RadioButton
value={el.type}
uncheckedColor={Colors.GrayDark}
color={Colors.BlueMedium}
checked={this.state.type === el.type}
/>
</View>
);
return (
<RadioButtonGroup
onValueChange={value => this.setState({ value })}
value={this.state.value}
>
{radioButtons}
</RadioButtonGroup>
);
}
render() {
const options = ...;
return (
<View style={styles.container}>
<Title style={styles.header}>{header}</Title>
{this.renderOptions(options)}
</View>
);
}
Expected the component to receive props defining which Platform is required to load. If none is received, get the running Platform.
| software | version
| --------------------- | -------
| ios or android | ios
| react-native | 0.55.2
| react-native-paper | 1.8.0
| node | 8.11.2
| npm or yarn | npm
Discussion related to https://github.com/callstack/react-native-paper/pull/415.
Closing since now you can use RadioButton.Android on iOS.
Most helpful comment
Closing since now you can use
RadioButton.Androidon iOS.