度符号(如摄氏度/华氏度)的一个TextView [英] Degrees symbol (as in Degrees Celsius/Fahrenheit) in a TextView

查看:2657
本文介绍了度符号(如摄氏度/华氏度)的一个TextView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,包括小的圆度符号,一个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");

这篇关于度符号(如摄氏度/华氏度)的一个TextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆