Change PasswordToggle Gravity to the left (for RTL language)

Viewed 918

I use TextInputLayout to get password from user like this:

<android.support.design.widget.TextInputLayout
                android:id="@+id/RegisterPassInput"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="16dp"
                app:passwordToggleEnabled="true"
                android:layout_marginRight="16dp"
                android:layout_toStartOf="@+id/RegisterPassImg">

                <EditText
                    android:id="@+id/RegisterPassET"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="right"
                    android:hint="@string/Password"
                    android:inputType="textPassword"
                    android:maxLength="40" />
            </android.support.design.widget.TextInputLayout>

and the result is:

enter image description here

But i want something like this:

enter image description here

How can i set passwordToggle gravity align left of the editText.
For lots of reasons I disabled rtl support in manifest

android:supportsRtl="false"
1 Answers
Related