Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not render correctly with flex #38

Open
jamesholcomb opened this issue Mar 4, 2022 · 1 comment
Open

Does not render correctly with flex #38

jamesholcomb opened this issue Mar 4, 2022 · 1 comment

Comments

@jamesholcomb
Copy link

      <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.

image

@ahnafnafee
Copy link

I am also facing the same issue. Testing OS: Android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants