度符号(如摄氏度/华氏度)的一个TextView摄氏度、符号、华氏度、TextView

2023-09-12 09:22:55 作者:宝宝要给你惊喜

有没有一种方法,包括小的圆度符号,一个TextView?这将是对温度读数,如在摄氏度或华氏度度。 我不知道是否有人已经做到了这一点编程了。

Is there a way to include the small circular degrees symbol to a TextView? This would be for temperature readings, as in degrees Celsius or Fahrenheit. I'm wondering if anyone has done this programmatically before.

推荐答案

没有用于摄氏度,你可以在Java中使用统一code符号:的 \℃左右 。对于飞轮海,你可以使用 \ u2109

There is a Unicode symbol for Celsius degrees that you can use in Java: \u2103. For Fahrenheit you can use \u2109.

我已经证实了这一作品在Android的Nexus S运行Android版本2.3.6。

I have confirmed this works on Android Nexus S running Android version 2.3.6.

例如code:

temperatureValue.setText((result) + " \u2109");
 
精彩推荐
图片推荐