EditText 的提示不适用于 Android 4.0.4 中的阿拉伯语

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

当我在 android 设备 (4.0.4) 中启动我的应用程序时
我在 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>

我已经在 question 中阅读了这些答案,但没有任何帮助:(

请帮帮我...

我不知道你的代码但是。您必须在 android 中创建一个 阿拉伯语字符串文件 在那里您可以使用阿拉伯语的提示,并且有一个默认字符串是英语。 因此,虽然 运行 您的应用程序将您的 phone 语言更改为阿拉伯语。你的字符串将自动工作

在清单中添加这一行

   <application
        ...
        android:supportsRtl="true"
        ... >
    </application>

我找到了解决方案!

要解决此问题,您需要删除 inputType 属性,它会正常工作。

或者您可以这样做:

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

但是您无法更改 inputType 属性。

因为如果您更改它,如果提示是阿拉伯语,则提示将为空