如何在android中显示阿拉伯文本? [英] How to show arabic text in android?

查看:38
本文介绍了如何在android中显示阿拉伯文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 android 中显示文本文件中的阿拉伯语文本.在某些手机和平板电脑上它似乎是正确的,但在某些 android 设备上它看起来像下面的文字:

I want to show Arabic text from text file in android. in some phones and tablets it seems to be correct, but on some android devices it looks like the below text:

ا ل س ل ا م     ع ل ي ك م

请帮助我如何在每台设备上正确显示它们.

Please help me how to show them correctly on every device.

推荐答案

我认为这里的问题是文本没有从右到左显示.您应该尝试使用 Bidi 类,或在您的XML:

I assume that the problem here is that the text is not shown right-to-left. You should try using the Bidi class, or by specifying the following in your XML:

<EditText android:layout_width="match_parent" android:layout_height="wrap_content"android:id="@+id/editText1" android:gravity="right">/EditText>

这篇关于如何在android中显示阿拉伯文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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