Commit 98f5c81
Update font scale on Android when recreating RootView (#52595)
Summary:
Pull Request resolved: #52595
Changelog: [ANDROID][FIXED] Update font scale when recreating `RootView`
At the moment `enableFontScaleChangesUpdatingLayout` flag only works when the activity is configured to handle font scale changes by itself (`configChanges="fontScale"` in the manifest).
When that configuration is missing, the OS handles the font scale changes by recreating the activity, but in this case the path responsible for updating internally kept font size isn't executed.
This diff updates the RootView, so that the display metrics are also updated when it's created. Alternative approach would be to do that on the Activity, but that assumes usage of `ReactActivity`.
Reviewed By: NickGerleman
Differential Revision: D78323174
fbshipit-source-id: e48583091767497b5dfd4f2d938329530de4068d1 parent ec91661 commit 98f5c81
1 file changed
Lines changed: 4 additions & 0 deletions
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
0 commit comments