Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android RTL password fields?

Tags:

android

It appears that if you have an EditText on android with the

android:inputType="textPassword" or android:password="true

fields on them, right-to-left text does NOT appear right-to-left (stays left-to-right).

However without the password denotations the text does appear RTL.

Is this a known issue or is there a workaround?

like image 718
VicVu Avatar asked Jul 24 '13 15:07

VicVu


3 Answers

For 17+ (4.2.x+) you can use textAlignment

android:textAlignment="viewStart"

like image 147
eveliotc Avatar answered Oct 16 '22 08:10

eveliotc


The only solution I've found was to set the gravity programatically to LEFT or RIGHT after setting the inputType.

like image 31
proowl Avatar answered Oct 16 '22 08:10

proowl


In my case, the problem was simply solved by changing the layout_width to wrap_content.

like image 1
Arman Kavian Avatar answered Oct 16 '22 09:10

Arman Kavian