I'm trying to make EditText
with a hint text:
In English "password" .. the cursor is correctly set to the left.
But for Arabic for which the hint is "كلمه المرور" the cursor is always set to the left (the end of the hint) instead of the right.
<EditText
android:id="@id/ETPass"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/etUsrName"
android:layout_marginLeft="@dimen/_25sdp"
android:layout_marginRight="@dimen/_25sdp"
android:layout_marginTop="@dimen/_5sdp"
android:background="@drawable/signup_edittext_input"
android:ellipsize="start"
android:gravity="center|right"
android:hint="@string/Password"
android:imeOptions="actionNext"
android:inputType="textPassword"
android:paddingRight="@dimen/_5sdp"
android:singleLine="true"
android:textColor="@color/orange"
android:textColorHint="@color/orange" />
This happens only for android:inputType="textPassword"
. Everything works fine for a normal text inputType
.
Say in your xml's edittext section, add android:paddingLeft="100dp" This will move your start position of cursor 100dp right from left end. Same way, you can use android:paddingRight="100dp" This will move your end position of cursor 100dp left from right end.
If you want your disabled EditText to look the same as your enabled one, you should use android:enabled="false" in combination with android:textColor="..." . Show activity on this post. Used this if you have an icon to be clickable, this works for me.
try this android:windowSoftInputMode="adjustResize" in your activity in manifest file.
For Android 17 and higher(4.2.+) its working:
android:textAlignment="viewStart"
Try:
android:textDirection="rtl"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With