Skip to content
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

Text fields do not support RTL properly #120

Open
PavloBohdanSonerim opened this issue Mar 13, 2023 · 3 comments
Open

Text fields do not support RTL properly #120

PavloBohdanSonerim opened this issue Mar 13, 2023 · 3 comments

Comments

@PavloBohdanSonerim
Copy link

PavloBohdanSonerim commented Mar 13, 2023

General information

When layout is set to RTL, the text field behaviour becomes incorrect.

One of the visible issues is that for fields like Credit Card, the TextInputLayout gives opposite gravitations to its hint and text.

@sshropshire
Copy link
Contributor

Hi @PavloBohdanSonerim thanks for using our library. Is there a video you can provide reproducing the issue? A video will help us get more visibility on the issue internally for prioritization.

@PavloBohdanSonerim
Copy link
Author

PavloBohdanSonerim commented Apr 10, 2024

@sshropshire . The issue is in the gravitation of the text for the apps in RTL mode.

This is the behavior in your latest release:

telegram-cloud-photo-size-2-5240203617355559740-x

Our project needs the Credit Card fields to look like this in RTL:

telegram-cloud-photo-size-2-5240203617355559675-x

I fixed it by removing this code in your sources:

private void setupRTL() {
        if (VERSION.SDK_INT >= 17 && this.getResources().getConfiguration().getLayoutDirection() == 1) {
            this.setTextDirection(3);
            this.setGravity(8388613);
        }

@PavloBohdanSonerim
Copy link
Author

@sshropshire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants