我想知道如何在 TextView (android) 中为角度制作度数符号。有几个类似的问题,我都试过了,但是好像不行。
<TextView
android:id="@+id/tv_counter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="20dp"
android:text="..."
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="80dp"
android:textColor="#FFA500" />
最佳答案
XML 不使用 C 风格的转义符,它使用 HTML 风格的字符实体。试试这个:
android:text="50℃"
正如您在评论中提到的,U+2103 不是您想要的,您想要这个:
android:text="50°"
关于xml - TextView 中的度数符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8777913/