mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 17:45:12 +08:00
Summary: On tablets, using Display.getRotation() returned ROTATION_0 or ROTATION_180 when it was in landscape, not portrait as it does on phones. This resulted in the Modal being sized incorrectly on tablets. Using size and comparing width and height is the only way I can think of to figure out the device orientation and give the modal the correct size. With this change, all issues listed in #7708 should be resolved. **Test plan** Modal should correctly fill screen on Android phone and tablet in both portrait and landscape. Closes https://github.com/facebook/react-native/pull/10159 Differential Revision: D3950369 Pulled By: andreicoman11 fbshipit-source-id: 9488c4302a76cc48e4f8a4026eb5770d40b6e3d2