我有以下角色:༼つ◕_◕༽つ
它在 strings.xml
中是这样的:
<string name="faceIcon_5">༼ つ ◕_◕ ༽つ</string>
和 Android Studio,似乎可以很好地显示角色。
然而,当它实际在手机上运行时,它看起来像这样:
好像有些字符不能被android显示。我能做什么?
最佳答案
您必须允许其中一些字符使用 unicode。
// Your Text View.
tv=(TextView)findViewById(R.id.textView1);
// Get A Unicode Font
Set a unicode font to your textview. Via TypeFace font = typeface.createfromasset(getassets(), someUNIcodeFont):
// set The font to your font
tv.setTypeface(font);
//set face to textview.
tv.setText(R.String.faceIcon_5);
关于android - 如何在Android中显示如下面孔,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36927485/