-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Update font scale on Android when recreating RootView #52595
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
|
This pull request was exported from Phabricator. Differential Revision: D78323174 |
4147906 to
ea5b557
Compare
Summary: 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
|
This pull request was exported from Phabricator. Differential Revision: D78323174 |
Summary: 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
ea5b557 to
cd052e4
Compare
|
This pull request was exported from Phabricator. Differential Revision: D78323174 |
|
This pull request has been merged in 5cda306. |
|
This pull request was successfully merged by @j-piasecki in 5cda306 When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: facebook#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: e48583091767497b5dfd4f2d938329530de4068d
Summary:
Changelog: [ANDROID][FIXED] Update font scale when recreating
RootViewAt the moment
enableFontScaleChangesUpdatingLayoutflag 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.Differential Revision: D78323174