android - 无法在 Android 编辑文本上输入波斯语文本

标签 android android-edittext

我试图在 Android 编辑文本上键入 Persion 文本,但编辑文本上没有显示任何内容,但它可以用英语工作。我正在使用 Genymotion 虚拟设备。

这是 xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:padding="20dp"
  android:layoutDirection="rtl"
  android:textDirection="rtl"
  android:layout_height="match_parent">


    <EditText
    android:hint="نام ..."
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/editName"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true" />

</RelativeLayout>

最佳答案

这可能是因为您的虚拟设备中的“语言和输入设置”。

如果这是您必须转到设置>语言和输入的问题;在 keyboard and input methods 下,选择 Default 并单击 set up input methods。在那里,您可以将多种输入语言添加到虚拟设备的键盘中(也可以将一种语言设置为默认语言)。

注意:路径可能因设备而异。

关于android - 无法在 Android 编辑文本上输入波斯语文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36350938/

相关文章:

android - 为什么 FLAG_ACTIVITY_CLEAR_TOP 不起作用?

android - 我应该如何迁移我的应用程序以使用 JobScheduler?

android - 如何以编程方式设置一些 imeOptions

android - 使用 GO 打开键盘

android - 从EditText获取Double值

java - 启动和停止来自广播接收器的通知

android - 处理 FirebaseUI 登录和离线 Firestore 数据?

android - 多行编辑文本和编辑文本的首字母大写

android - 如何动画状态栏和工具栏的颜色变化(就像新的日历应用程序一样)

android - EditText软数字键盘有时不允许数字