Update on orientation change
polasymbiose opened this issue · comments
Hi,
Widgets dont seem to update dimensions on orientation change.
I have tried with width: 'match_parent'
and flex: 1
on the parent FlexWidget.
For example, when i add a simple Container with a border on tablet landscape and turn to portrait, the borders are cut.
<FlexWidget style={{ height: 'match_parent', width: 'match_parent', borderWidth: 1, }} />
![Bildschirmfoto 2024-05-31 um 08 33 36](https://private-user-images.githubusercontent.com/16652482/335474863-4920ff38-8e77-4a5e-8e15-7fa13a7df1b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzNTk3MTYsIm5iZiI6MTcyMTM1OTQxNiwicGF0aCI6Ii8xNjY1MjQ4Mi8zMzU0NzQ4NjMtNDkyMGZmMzgtOGU3Ny00YTVlLThlMTUtN2ZhMTNhN2RmMWI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE5VDAzMjMzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY1ZTJlNmY0MzZhZGE3MmU2NWNmYTg0ZGM2YWFhNTUzNTkyYWM5NmY2NGM3NGRmNjU3NzUxNGIyMzdlZmEzNWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Ynblpej-8cZAYX3MRFKP6I5xXg0exg7skVCj1JQcUUM)
![Bildschirmfoto 2024-05-31 um 08 33 44](https://private-user-images.githubusercontent.com/16652482/335474871-05f69492-aa9a-4a5d-a7e6-cb223ef1ecc0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzNTk3MTYsIm5iZiI6MTcyMTM1OTQxNiwicGF0aCI6Ii8xNjY1MjQ4Mi8zMzU0NzQ4NzEtMDVmNjk0OTItYWE5YS00YTVkLWE3ZTYtY2IyMjNlZjFlY2MwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE5VDAzMjMzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI0ZGE5ZjdlOTdmOTgzYTVhNTk3OWYwOWJiYzcwZTI0NzA2MGEzYzQxNDFjYzgxZWY5MDEwZmU4MTE1NjZjNTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gpa71ZMsDnMA8puVd0fADSTnFyMtzGb5INTlp4sN4pg)
Any proposals how to handle this?
As far as I know this is not possible to achieve by using this library.
Android does not call any method in the AppWidgetProvider
on screen rotation, so there is no way for us to listen to orientation changes.
Other apps can achieve this because they use different layout for landscape and portrait mode, but still no method is called.
This is similar to #36
I'll close this since it is not possible (or I couldn't find a way), but feel free to reopen it if you find a way and I can try to implement it.