Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android add tm (trademark) symbol to text [closed]

Tags:

java

android

How can I ad the TM symbol to a line of text like you would in HTML

™ 
like image 296
Sarah Stevens Avatar asked Dec 27 '14 03:12

Sarah Stevens


2 Answers

Assuming you can't use the HTML entity you provided

™ 

you can use the unicode escape

String str = "\u2122";

or the character literal

String str = "™";
like image 156
Elliott Frisch Avatar answered Oct 29 '22 21:10

Elliott Frisch


For Android String.xml - use:

™

For example:

<string name="company_name">Company &#8482;</string>

This will show as:

Company ™

like image 45
Wildroid Avatar answered Oct 29 '22 23:10

Wildroid