Set and require android:supportsRtl="true" for RTL layout#44538
Closed
NickGerleman wants to merge 1 commit intofacebook:mainfrom
Closed
Set and require android:supportsRtl="true" for RTL layout#44538NickGerleman wants to merge 1 commit intofacebook:mainfrom
NickGerleman wants to merge 1 commit intofacebook:mainfrom
Conversation
Contributor
|
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
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D57248205 |
Contributor
|
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
|
Hey, now I can't run the native app as LTR and the React app as RTL. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:supportsRtlin template matching default new Android projects, and to avoid mismatched states in the future, will only tell I18NManager that RTL is allowed ifandroid:supportsRtlis 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