This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
Closes #7861: position text based on layout direction, not on text directionality #28340
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.
There is a number of visual issues coming from positioning text according to its direction, ignoring the layout direction. Setting a RTL language makes the design inconsistent, because English text would still appear LTR. Considering orientation over locale could make the UI more consistent. This change is aiming for that.
Was also considering
android:textDirection="locale"
solution, but it lead to edge cases, where the first strong character of the string would override the direction, so "This time search in:" would become ":This time search in" in RTL mode.Is part of a general push for more RTL support. This patch is focused on the text positioning only. Also fixes this and this bugs.
Pull Request checklist
QA
To download an APK when reviewing a PR (after all CI tasks finished running):
Checks
at the top of the PR page.firefoxci-taskcluster
group on the left to expand all tasks.build-debug
task.View task in Taskcluster
in the newDETAILS
section.GitHub Automation
Fixes #7861