-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Set and require android:supportsRtl="true" for RTL layout #44538
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request was exported from Phabricator. Differential Revision: D57248205 |
Base commit: 3f17c8b |
…4538) Summary: Android originated without RTL support. When RTL support was added, Applications needed to set `android:supportsRtl="true"` in their manifest, to allow Android to do RTL specific layout and drawing. This became the default for new projects created by Android Studio at some point. React Native was not setting this in template, which means apps created from it do not do any of Android's RTL layout, text alignment, or drawing (e.g. in D3652980 8 years ago, a native drawer component came from the wrong side of the screen). RN would still layout the app using Yoga in RTL if in RTL locale though. This change sets `android:supportsRtl` in template matching default new Android projects, and to avoid mismatched states in the future, will only tell I18NManager that RTL is allowed if `android:supportsRtl` is also set. This is breaking, since existing apps may not get Yoga RTL support unless telling Android that the application should support RTL layout. Changelog: [Android][Breaking] - Set and require `android:supportsRtl="true"` for RTL layout Differential Revision: D57248205
aced5b1
to
673f5d7
Compare
This pull request was exported from Phabricator. Differential Revision: D57248205 |
This pull request has been merged in 82c6f8a. |
This pull request was successfully merged by @NickGerleman in 82c6f8a. When will my fix make it into a release? | How to file a pick request? |
blakef
pushed a commit
to react-native-community/template
that referenced
this pull request
Jun 4, 2024
Summary: Pull Request resolved: facebook/react-native#44538 Android originated without RTL support. When RTL support was added, Applications needed to set `android:supportsRtl="true"` in their manifest, to allow Android to do RTL specific layout and drawing. This became the default for new projects created by Android Studio at some point. React Native was not setting this in template, which means apps created from it do not do any of Android's RTL layout, text alignment, or drawing (e.g. in D3652980 8 years ago, a native drawer component came from the wrong side of the screen). RN would still layout the app using Yoga in RTL if in RTL locale though. This change sets `android:supportsRtl` in template matching default new Android projects, and to avoid mismatched states in the future, will only tell I18NManager that RTL is allowed if `android:supportsRtl` is also set. This is breaking, since existing apps may not get Yoga RTL support unless telling Android that the application should support RTL layout. Changelog: [Android][Breaking] - Set and require `android:supportsRtl="true"` for RTL layout Reviewed By: joevilches Differential Revision: D57248205 fbshipit-source-id: 3f60c9f855db26f8d34a2e05d460f95961f5ffeb Original: facebook/react-native@82c6f8a
kosmydel
pushed a commit
to kosmydel/react-native
that referenced
this pull request
Jun 11, 2024
…4538) Summary: Pull Request resolved: facebook#44538 Android originated without RTL support. When RTL support was added, Applications needed to set `android:supportsRtl="true"` in their manifest, to allow Android to do RTL specific layout and drawing. This became the default for new projects created by Android Studio at some point. React Native was not setting this in template, which means apps created from it do not do any of Android's RTL layout, text alignment, or drawing (e.g. in D3652980 8 years ago, a native drawer component came from the wrong side of the screen). RN would still layout the app using Yoga in RTL if in RTL locale though. This change sets `android:supportsRtl` in template matching default new Android projects, and to avoid mismatched states in the future, will only tell I18NManager that RTL is allowed if `android:supportsRtl` is also set. This is breaking, since existing apps may not get Yoga RTL support unless telling Android that the application should support RTL layout. Changelog: [Android][Breaking] - Set and require `android:supportsRtl="true"` for RTL layout Reviewed By: joevilches Differential Revision: D57248205 fbshipit-source-id: 3f60c9f855db26f8d34a2e05d460f95961f5ffeb
kosmydel
pushed a commit
to kosmydel/react-native
that referenced
this pull request
Jun 11, 2024
Summary: Pull Request resolved: facebook#44599 Contributed in D57248205 / facebook#44538 From: ``` buck2 run //xplat/js/scripts/rn-api:generate-rn-api-metadata ``` Changelog: [Internal] Reviewed By: rshest Differential Revision: D57487065 fbshipit-source-id: 35308c7a1ef7368b4b1792fe26cf057e45de1360
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
Partner
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Android originated without RTL support. When RTL support was added, Applications needed to set
android:supportsRtl="true"
in their manifest, to allow Android to do RTL specific layout and drawing. This became the default for new projects created by Android Studio at some point.React Native was not setting this in template, which means apps created from it do not do any of Android's RTL layout, text alignment, or drawing (e.g. in D3652980 8 years ago, a native drawer component came from the wrong side of the screen). RN would still layout the app using Yoga in RTL if in RTL locale though.
This change sets
android:supportsRtl
in template matching default new Android projects, and to avoid mismatched states in the future, will only tell I18NManager that RTL is allowed ifandroid:supportsRtl
is also set. This is breaking, since existing apps may not get Yoga RTL support unless telling Android that the application should support RTL layout.Changelog:
[Android][Breaking] - Set and require
android:supportsRtl="true"
for RTL layoutDifferential Revision: D57248205