-
Notifications
You must be signed in to change notification settings - Fork 662
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
Make sure CVC, Date, and card number are always LTR regardless of the language #3524
Conversation
… language setting.
@@ -262,6 +262,8 @@ class ExpiryDateEditText @JvmOverloads constructor( | |||
shouldShowError = true | |||
} | |||
} | |||
|
|||
layoutDirection = LAYOUT_DIRECTION_LTR | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried several different approaches to try to set this up in robolectric without any luck.
@@ -177,6 +177,8 @@ class CardNumberEditText internal constructor( | |||
} | |||
|
|||
updateLengthFilter() | |||
|
|||
this.layoutDirection = LAYOUT_DIRECTION_LTR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be done in StripeEditText
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That feels like a wide sweep, like if you used it for email address, that wouldn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Should we do this for PostalCodeEditText
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can we add a comment in the card widgets that they are LTR only if we don't already have that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a little research, and from what I found the postal code edit text is functionality as other apps. I did make a note in the comment as well that this was explicit.
Summary
When entering credit card numbers, month, date, and cvc in countries that use rtl formatting, the text view should still be ltr.
Motivation
#3515
Testing