0

I have edit text with hint, and trying to align left my editText (with rtl language), but i want my cursor will be at the beginning of the line. So far no luck with that... any suggestions?

my screen

enter image description here

xml

    <com.fibi.ui.views.edit_text.FibiEditText
        android:id="@+id/userCodeEditText"
        android:layout_width="match_parent"
        android:layout_height="41dp"
        android:background="@drawable/bg_alpha_top_radius"
        custom:hintText="@string/login_user_code"
        android:lines="1"
        android:maxLines="1"
        android:paddingRight="13dp"
        android:singleLine="true"
        app:customFont_fibiRditText="@string/reforma_regular"
        custom:textColor="@color/t7" 
        custom:hintTextColor="@color/t7" />

    <com.fibi.ui.views.edit_text.FibiEditText
        android:id="@+id/passwordEditText"
        android:layout_width="match_parent"
        android:layout_height="41dp"
        android:layout_below="@+id/userCodeEditText"
        android:background="@drawable/bg_alpha_no_radius"
        custom:hintText="@string/login_password"
        custom:inputType="password"
        android:lines="1"
        android:maxLines="1"
        android:paddingRight="13dp"
        android:singleLine="true"
        app:customFont_fibiRditText="@string/reforma_regular"
        custom:textColor="@color/t7" 
        custom:hintTextColor="@color/t7" />

</RelativeLayout>

On my java file i have those lines:

editText.setGravity(Gravity.LEFT);
editText.setEllipsize(TextUtils.TruncateAt.END);
editText.setInputType(InputType.TYPE_CLASS_TEXT);
Bruse
  • 303
  • 1
  • 6
  • 20

1 Answers1

0

I don't know if i understood right, but are you trying to put the cursor in the beginning of the edit text? If that's so...

editText.setSelection(0);