Skip to content

Conversation

@j-piasecki
Copy link
Contributor

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.

Differential Revision: D78323174

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78323174

j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Jul 18, 2025
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
@facebook-github-bot
Copy link
Contributor

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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78323174

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 18, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 5cda306.

@react-native-bot
Copy link
Collaborator

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?

kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants