-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Layout inconsistency between Switch & SwitchAndroid #3785
Comments
@christopherdro - images seem to be broken :O could you update? |
@brentvatne loads for me on mobile |
So there are a couple ways this can be fixed but wanted to get some feedback before submitted a PR. After talking to @mkonicek this last week at Reactive2015 he mentioned that size of the switch for android is calculated automatically whereas it need to be defined for IOS. So I'm wondering if we should remove this section entirely react-native/Libraries/Components/Switch/Switch.js Lines 111 to 114 in 2c7de35
props.style = [styles.rctSwitchAndroid, this.props.style]; or alter it to props.style = this.props.style;
|
This looks like a bug, thanks for reporting! @sahrens I think the fixed size was added as part of the universal Switch and react-native/Libraries/Components/Switch/Switch.js Lines 111 to 114 in 2c7de35
|
Summary: Fixed facebook#3785 Closes facebook#4298 Reviewed By: svcscm Differential Revision: D2807289 Pulled By: mkonicek fb-gh-sync-id: 6f161e4f8b04597726183fdcf8bc22c682557958
Switch
SwitchAndroid
The width value here seems to be incorrect.
https://github.com/facebook/react-native/blob/master/Libraries/Components/Switch/Switch.js#L113
No exactly sure if this applies to all devices so I wanted to check before making any kind of PR.
The text was updated successfully, but these errors were encountered: