Android set degree symbol to Textview [duplicate]

2019-02-01 16:38发布

问题:

This question already has an answer here:

  • Degrees symbol (as in Degrees Celsius/Fahrenheit) in a TextView 5 answers

How can I set the degree symbol to a TextView in Android?

回答1:

The unicode value for it is U+00B0 so you could do the following:

myTextView.setText ( "78" + (char) 0x00B0 );