简体   繁体   English

如何显示来自服务器的动态字符到Android中的textView

[英]How to show dynamic character coming from server to textView in android

Please any one tell me that how can I show character like �cija in android textview. 请任何人告诉我如何在android textview中显示�cija这样的字符。 ie some spanish word I have to show in textview 即我必须在textview中显示一些西班牙语单词

Use Unicode Format for this, It will work for sure. 为此使用Unicode格式,它将确保正常工作。 I Use Chinese character and it worked pretty well for me. 我使用汉字,对我来说效果很好。

Do something like this for an example 做这样的例子

 TextView t = (TextView)findViewById(R.id.TextView01);
 t.setText(Character.toString('\u4E01'));

What so ever character you want to print put its unicode value in the string. 您要打印的字符将其unicode值放入字符串中。
It will for sure show you the Chinese character in view. 它肯定会向您显示汉字。 if you are not able to see your character even after putting its unicode. 如果即使放置了Unicode也看不到您的字符。 then check for the authentication of unicode character is it right unicode or not. 然后检查unicode字符的身份验证是否正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM