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.
Lui*_*ano 109
您可以在Java中使用可用于摄氏度的Unicode符号:\u2103.对于华氏,你可以使用\u2109.
我已经确认这适用于运行Android 2.3.6版的Android Nexus S.
示例代码:
temperatureValue.setText((result) + " \u2109");
小智 12
在摄氏活动中
tempValue.setText((resultemp) + " \u2103");
为华氏温度
tempValue.setText((resultemp) + " \u2109");
为开尔文
tempValue.setText((resultemp) + " \u212A");
为罗默
tempValue.setText((resultemp) + " \u00B0R");
在xml.file中为摄氏度
android:text="\u2103"
为华氏温度
android:text="\u2109"
为开尔文
android:text="\u212A"
为罗默
android:text="\u00B0R"
| 归档时间: | 
 | 
| 查看次数: | 38135 次 | 
| 最近记录: |