[英]Android TextView displays strange text
我编写了一个应用程序,我需要在来自服务器的TexView
文本中显示。 在TextView
上设置文本时,我遇到了一种奇怪的行为。
例如,我从服务器接收“español”,但 Textview 显示“espacol”有办法修复编码或显示“spannish”而不映射应用程序中的文本。
任何帮助将不胜感激。
您可以将 String.format() 与 Locale 一起使用。
例如;
String text = String.format(Locale.ENGLISH, "%d", item.getText());
textView.setText(text);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.