-
Notifications
You must be signed in to change notification settings - Fork 24.6k
When the app is rotated, reload the root view. #848
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
Conversation
I appreciate this, but IMO I wouldn't call it a "fix" for #813. This behavior would not be acceptable in any app of mine. Especially wouldn't want this to be the default behavior. Another stopgap for that issue would be to set alignItems on any single line text, or explicit width if you can manage. There isn't a solution for multiline that I can find now though. |
You probably want to layout the React views when the root view / native view controller roots are resized and I expect the end effect will look quite nice. Agree with @drkibitz that I wouldn't want to blow away the entire app when the user rotates their device and in some ways this is similar to crashing if the user loses their state. If this behavior is ok for your app I think it'd be better to keep it in your own app's code. |
Yeah, this is not the right way to go. Also note that the UIExplorer app does do somewhat animated re-layout on rotation... |
Summary: Specifically, updates the UWP .vcxproj for MSBuild and also exposes the UseLegacyStretchBehaviour API for use with react-native-windows. Pull Request resolved: facebook/yoga#848 Reviewed By: SidharthGuglani Differential Revision: D13848609 Pulled By: davidaurelio fbshipit-source-id: eab046ff3c47e49706f515e209d8aaf750c2198f
Summary: Specifically, updates the UWP .vcxproj for MSBuild and also exposes the UseLegacyStretchBehaviour API for use with react-native-windows. Pull Request resolved: facebook/yoga#848 Reviewed By: SidharthGuglani Differential Revision: D13848609 Pulled By: davidaurelio fbshipit-source-id: eab046ff3c47e49706f515e209d8aaf750c2198f
A simple fix to rotation issue: on rotate simply reload the root view.
Ideally it should animate the changes, but until I figure out how to do that this should do.
FixesWorkaround #813.