8

我想在 Android Studio 中写波斯语,但是在输入波斯语后,Android Studio 显示了一些奇怪的字符。当然,大约 3 个月是对的,但突然之间就很奇怪了。

在此处输入图像描述

4

5 回答 5

4

在 android studio 1.2 你应该去配置>设置>颜色和字体>字体>使用你的方案>取消选中仅显示等宽字体>最后使用 tahoma 字体并应用并确定。好好享受!

操作说明

于 2015-05-02T16:42:36.250 回答
1

在 Android Studio 中,转到设置--> 编辑器--> 字体和颜色--> 字体,选中“辅助字体”复选框并从列表中定义一个波斯语字体,如“Nazanin”。另外,取消选中“仅显示等宽字体”。

于 2017-05-17T07:30:46.533 回答
0

In android versions later than 3, you don't need anything but in earlier versions you must add Farsi.java to your app and in the code write text as follow:

MyTextView = (TextView) findViewById(R.id.MyTextView);

Typeface tf = Farsi.GetFarsiFont(this);
MyTextView.setTypeface(tf);
MyTextView.setText(Farsi.Convert("سلام"));

you cann't write farsi text in xml files in earlier versions!!! so I suggest to use newer versions of android.

于 2015-04-26T08:10:22.557 回答
0

select your project in android studio and go to File/Setting menu. in the opened page point to File Encodings option and in that tabbed ensure IDE Encoding is UTF-8

于 2015-04-26T09:48:47.250 回答
-1


对于 Windows 中的 Android Studio 1.5,在C:\Users\.AndroidStudio1.5中创建名为“idea.properties”
的文件并将其写入文件中:

editor.new.rendering=true
于 2016-03-31T12:16:55.430 回答