gpt4 book ai didi

android - 如何在Android中显示如下面孔

转载 作者:行者123 更新时间:2023-11-29 19:53:21 24 4
gpt4 key购买 nike

我有以下角色:༼つ◕_◕༽つ

它在 strings.xml 中是这样的:

<string name="faceIcon_5">༼ つ ◕_◕ ༽つ</string>

和 Android Studio,似乎可以很好地显示角色。

然而,当它实际在手机上运行时,它看起来像这样:

enter image description here

好像有些字符不能被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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com