有一个应用了 textWatcher 的 editText。正如您在下面的 Gif 中看到的,我无法从 EditText 的末尾删除数字,但首先。当语言环境是英语时一切正常,但不是阿拉伯语。
<EditText
android:id="@+id/destination"
android:inputType="number"
android:maxLength="19"
android:digits="0123456789-"
android:hint="@string/to"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="16sp"
android:imeOptions="actionDone"
/>
最佳答案
阿拉伯语不是从右向左读的吗?所以左边实际上是结束。
好的,尝试添加 android:inputType="number"
关于android - 无法使用退格键删除 editText 中的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47393683/