I have a login screen that consists of two EditText views. When using an arabic locale the password input field gets right aligned and starting to work according to RTL language rules. The username input field is not affected in any way. The layout XML for my two input fields looks like this:
<!-- Username input. -->
<EditText
android:id="@+id/login_edittext_username_input"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_marginBottom="0.66667dp"
android:background="@drawable/general_inputfield_normal"
android:singleLine="true"
android:imeOptions="actionNext"
android:inputType="textEmailAddress"
android:hint="@string/login_input_username_hint"
android:textColorHint="@color/edit_text_hint" />
<!-- Password input. -->
<EditText
android:id="@+id/login_edittext_password_input"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_marginBottom="0.66667dp"
android:background="@drawable/general_inputfield_normal"
android:singleLine="true"
android:inputType="textPassword"
android:imeOptions="actionDone"
android:hint="@string/login_input_password_hint"
android:textColorHint="@color/edit_text_hint" />
I've tried to align the two and found out that android:inputType="textPassword"
is the cause. Is there a way to make the password input field behave like the username input field, i.e. left aligned and left-to-right input, but still with the textPassword capabilities?