How to make EditText Hint right to left -sided
I write Arabic word hint ,, and its showing on the left side .
How to make EditText Hint right to left -sided
I write Arabic word hint ,, and its showing on the left side .
 
    
    try to use attributes
android:textDirection="locale"
android:textAlignment="viewStart"
It works for me
 
    
    You can use below code to resolve your problem:
        myEditText.addTextChangedListener(new TextWatcher() {
        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }
        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            if (myEditText.getText().toString().length() > 0 & myEditText.getGravity() != Gravity.LEFT) {
                myEditText.setGravity(Gravity.LEFT);
            } else if (myEditText.getText().toString().length() == 0 & myEditText.getGravity() != Gravity.RIGHT) {
                myEditText.setGravity(Gravity.RIGHT);
            }
        }
        @Override
        public void afterTextChanged(Editable s) {
        }
    });
 
    
    You can use android:gravity to change the position of your text in side the EditText container. Here you can find more about Gravity.
For example
<EditText
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:hint="Your hint here"
    android:gravity="end"
    android:id="@+id/editText" />
