Question

How can I make the application name in superscript, I've tried this way:

<string name="app_name">SomeApp <sup><small><b>beta</b></small></sup></string>

it works on TextView's but it doesn't work on the application name.

Something like this is what I'm trying to accomplish:

enter image description here

Was it helpful?

Solution

You need to use ISO-8859-1 / UTF-8 characters to accomplish inserting (in your case) a superscript 3.

List of HTML ISO-8859-1 Reference entities.

For example in your AndroidManifest.xml

<application
    android:hardwareAccelerated="true"
    android:icon="@drawable/ic_launcher"
    android:label="Myapp³" <!--or reference it from @string -->

Or use the HTML entity &#xb3; (hex) &#179; (dec) somewhere in a String, like:

<string name="app_name">Myapp&#179;</string>

Small compilation of Unicode reference tables

Unicode 6.2 Character Code Charts

(from wikipedia)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top