alphamu / PinEntryEditText

An EditText that looks like a pin entry field. It is highly customisable and even animated text.
Apache License 2.0
670 stars 137 forks source link

RTL layout wrong direction for pin code #51

Open malhobayyeb opened 5 years ago

malhobayyeb commented 5 years ago

In Arabic (which is a RTL language) numbers are always entered from left to right just like LTR lanuages.

However, this library sets the direction of pin entry from right to left.

So, if pin is 0234

Expected-LTR: 0 2 3 4

Expected-RTL: (Same as LTR) 0 2 3 4

Actual-LTR: 0 2 3 4

Actual-RTL: (Big Mistake) 4 3 2 0

Please make them the same or make it customizable.

Currently you are using:

Locale.getDefault()

Why not use a custom attribute and give it higher priority than the Locale.getDefault()

WajdyEssam commented 5 years ago

This is resolved on the last update of the library, you could use android:layoutDirection="ltr"