Search code examples
androidandroid-edittextarabichint

EditText's Hint doesn't work with arabic language in Android 4.0.4


when i launch my app in android device (4.0.4)
i don't see Arabic hint in EditText

activity_main.xml

<EditText
    android:id="@+id/gradeInput"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginStart="1dp"
    android:layout_marginLeft="1dp"
    android:layout_marginTop="208dp"
    android:layout_marginEnd="1dp"
    android:layout_marginRight="1dp"
    android:layout_marginBottom="478dp"
    android:autofillHints=""
    android:ems="10"
    android:hint="@string/inputHint"
    android:inputType="numberDecimal"
    android:maxLength="5"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    tools:targetApi="o" />

strings.xml

<string name="inputHint">تلميح</string>

i have read these answers in this question, but nothing has helped me :(

please help me...


Solution

  • I found the solution!

    to solve this problem, you need to delete inputType attribute and it's will work fine.

    or you can do this :

    <EditText
        ...
        android:inputType="none" />
    

    But you cannot change the inputType attribute.

    because if you changed it, the hint will be empty if the hint was arabic