Reputation: 2042
I'm writing an app in persian language (it's a right to left language). Everything is ok with EditText with inputType "text" and "number", but those EditTexts that have inputType="numberPassword", show the entered number in the starting position of the text (android:gravity set to "left"), but the numbers are always left to right no matter what language is. This makes the user confuse. It's a problem mostly in new android versions (api 15 and above). I made a trick for this, I renamed layout-fa to to layout-fr and values-fa to values-fr (cause farsi is right to left language and france is left to right) and there's layout-en & values-en folder for switch the language to english in the app. It's working now but is there a better solution? Did anybody faced this problem? thanks in advance...
Upvotes: 3
Views: 803
Reputation: 2042
problem solved with this tag in widget :
android:layoutDirection="ltr"
Upvotes: 1