Repository navigation
Update border geometry when layout direction changes on Android (#60161) - #60161
Merged
Merged
Conversation
|
@jasozh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D132253217. |
jasozh
added a commit
to jasozh/react-native
that referenced
this pull request
Nov 23, 2026
…t#60161) Summary: Pull Request resolved: react#60161 Fixes an issue where border radius on drawables is not updated when the direction style changes on Android. ### Root Cause Background, border, and background image drawables cache paths built from the resolved border radii and widths. When a mounted view's layout direction changed by toggling the `direction` style, logical values such as `borderTopStartRadius` kept their previous physical corners and edges. The view's outline, used for the `elevation` shadow, had the same problem. ### This PR Override `onLayoutDirectionChanged()` to add `invalidateSelf()` for BackgroundDrawwable, BackgroundImageDrawable, BorderDrawable, and CompositeBackgroundDrawable. Changelog: [Android][Fixed] - Fix logical border radii and widths not updating when a view's layout direction changes at runtime Reviewed By: vzaidman Differential Revision: D132253217
jasozh
force-pushed
the
export-D132253217
branch
from
November 23, 2026 22:55
0c078ae to
880ed4b
Compare
…t#60161) Summary: Fixes an issue where border radius on drawables is not updated when the direction style changes on Android. ### Root Cause Background, border, and background image drawables cache paths built from the resolved border radii and widths. When a mounted view's layout direction changed by toggling the `direction` style, logical values such as `borderTopStartRadius` kept their previous physical corners and edges. The view's outline, used for the `elevation` shadow, had the same problem. ### This PR Override `onLayoutDirectionChanged()` to add `invalidateSelf()` for BackgroundDrawwable, BackgroundImageDrawable, BorderDrawable, and CompositeBackgroundDrawable. Changelog: [Android][Fixed] - Fix logical border radii and widths not updating when a view's layout direction changes at runtime Reviewed By: vzaidman Differential Revision: D132253217
jasozh
force-pushed
the
export-D132253217
branch
from
November 26, 2026 08:41
880ed4b to
4b8adff
Compare
vzaidman
approved these changes
Nov 26, 2026
vzaidman
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Visual regressionNo visual differences at ios: no capture |
Collaborator
|
This pull request was successfully merged by @jasozh in c3b3eaa When will my fix make it into a release? | How to file a pick request? |
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:
Fixes an issue where border radius on drawables is not updated when the direction style changes on Android.
Root Cause
Background, border, and background image drawables cache paths built from the resolved border radii and widths. When a mounted view's layout direction changed by toggling the
directionstyle, logical values such asborderTopStartRadiuskept their previous physical corners and edges. The view's outline, used for theelevationshadow, had the same problem.This PR
Override
onLayoutDirectionChanged()to addinvalidateSelf()for BackgroundDrawwable, BackgroundImageDrawable, BorderDrawable, and CompositeBackgroundDrawable.Changelog: [Android][Fixed] - Fix logical border radii and widths not updating when a view's layout direction changes at runtime
Reviewed By: vzaidman
Differential Revision: D132253217