You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 📜 Description
Fixed wrong dimensions when phone gets rotated.
## 💡 Motivation and Context
We need to update shadow node layout whenever screen dimensions changes,
so in this PR I'm doing this. I use `onSizeChanged` method as a
lifecycle method for updating layout. Technically I could use
`onLayout`, but it's highly undesirable to block `onLayout` method, so
it's better to do it in `onSizeChanged`.
Fixes Android issue described in
#915
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### Android
- moved state wrapper to `hostView`;
- manage `ShadowNode` layout inside `hostView`.
## 🤔 How Has This Been Tested?
Tested manually on Medium Phone API 35.
## 📸 Screenshots (if appropriate):
[okv-rotation.webm](https://github.com/user-attachments/assets/6b49d0b3-e266-47e7-89af-1a8a3b4de6ce)
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
0 commit comments