对于Android模拟器阿拉伯文文本支持 [英] Arabic text support for Android Emulator

查看:154
本文介绍了对于Android模拟器阿拉伯文文本支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示我的Andr​​oid应用程序阿拉伯文字。我开发了Android 1.6的应用程序。

I would like to display Arabic text in my Android application. I am developing the application for Android 1.6.

问题是,当我运行应用程序,我只能看到,而不是阿拉伯文字方框。

Problem is, when i run the application i can only see square boxes instead of Arabic text.

google'ing我找到了字体(*。TTF -true类型的字体)为阿拉伯语后,必须添加。
[<一个href=\"http://www.mydigitallife.info/2010/07/02/how-to-install-and-add-hebrew-arabic-and-unsupported-language-fonts-to-android-phone/\" rel=\"nofollow\">http://www.mydigitallife.info/2010/07/02/how-to-install-and-add-hebrew-arabic-and-unsupported-language-fonts-to-android-phone/ ]。但解决的办法是真实的设备。更多在模拟器中的大部分命令。[例如:su,MKDIR,CHMOD等]不允许

After google'ing i found the font(*.ttf -true type font) for Arabic has to be added. [ http://www.mydigitallife.info/2010/07/02/how-to-install-and-add-hebrew-arabic-and-unsupported-language-fonts-to-android-phone/ ]. But the solution is for real devices. More over in emulator most of the commands [ex: su,mkdir,chmod etc] are not permitted.

我工作在Windows XP时,Eclipse 3.5.2,Android 1.6的。所有我需要的是显示模拟器阿拉伯文文本的解决方案。

I'm working on windows XP, Eclipse 3.5.2, Android 1.6. All i need is a solution to display Arabic text in emulator.

任何在这方面你的努力是从我的身边尊重: - )

Any of your effort in this regard is respected from my side:-)

推荐答案

我有我的朋友对上述方案表示概率..

I've got solution from my friend for the above said prob..

和共享相同这里..

如果您有的.ttf 文件然后首先在Eclipse中打开您的项目,并复制的.ttf 文件注入资产的文件夹,这将是在项目层次。
并在您要使用的字体,只是按照以下步骤操作,然后打开的.java 文件: -

If you are having .ttf file then first of all open your project in eclipse and copy .ttf file into the assets folder, which will be in your project hierarchy. and then open .java file where you want to use that font and just follow these steps:-

First
Typeface font1;
TextView txt1;
EditText edtxt;

二:
在onCreate方法只是写下这个code。

Second: In onCreate Method just write down this code.

/*here fonttype.ttf is the file which was copied in assets folder.*/

font1 =Typeface.createFromAsset(getAssets(),"fonttype.ttf");
txt1 =(TextView) findViewById(R.id.user_id_txt);
txt1.setTypeface(font1);

edtx = (EditText) findViewById(R.id.editText);
edtx.setTypeface(font1);

本您的问题将解决。

by this your problem will solve.

所有学分转到我的朋友

这篇关于对于Android模拟器阿拉伯文文本支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆