react-native-segmented-control
react-native-segmented-control copied to clipboard
Does not render correctly with flex
<View style={{ flexDirection: 'row' }}>
<View style={{ flex: 0.5 }}>
<SegmentedControl
containerMargin={16}
segments={['Label 1', 'Label 2']}
onChange={(index) => setTabIndex(index)}
currentIndex={tabIndex}
badgeValues={[2, null, 1]}
/>
</View>
<View style={{ flex: 0.5, backgroundColor: 'red' }} />
</View>
The calculation of the width seems to based on the device, not the the layout.
I am also facing the same issue. Testing OS: Android