Android:已连接且彩色的阿拉伯字母 [英] Android : Connected and colored arabic letters

查看:113
本文介绍了Android:已连接且彩色的阿拉伯字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在android视图(webview或textview)上显示连接的 AND 彩色阿拉伯字母. 首先,我使用了没有颜色的TextView,并且阿拉伯语正确显示.

I want to display connected AND colored arabic letters on a android view (webview or textview). First, I've used TextView without color and the arabic displayed correctly.

当我使用spannableString时,彩色字母会与单词断开连接.

When I use spannableString, the colored letter disconnect from the word.

第二,我使用了带有html和字体标签的WebView.我得到了相同的结果.

Secondly, I've used a WebView with html and font tags. I've got the same result.

每次我尝试在单词中的字母上涂上颜色时,该字母显示都与单词断开.

Each time I try to put color on a letter in a word, this letter display disconnected from the word.

有人可以解决这个问题吗?

Does anyone has a solution to this problem ?

Android版本> 4.0

Android version>4.0

推荐答案

您必须将字母更改为Unicode.

You must change the letters to Unicode.

例如,对于ب使用\ ufe91,对于س使用\ ufeb4,然后更改颜色.

For example, use \ufe91 for ب and use \ufeb4 for س, and then change the color.

如果您的文字较大,则在Android中显示可能会变慢.

If your text is big, it may be slow to show in Android.

我认为在显示大跨度文本时会遇到问题.

I think it has problems when showing big Spannable text.

这篇关于Android:已连接且彩色的阿拉伯字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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