I need to include the following square root sign in my android as a Text resource in Button control. Any guesses?
Asked
Active
Viewed 1.7k times
4 Answers
7
The unicode code for square root symbol is 221A
. You can define string resource as:
<string name="square_root_symbol">\u221a</string>
And then use it in your button:
<Button ... android:text="@string/square_root_symbol" />

inazaruk
- 74,247
- 24
- 188
- 156
-
Please see the image I included carefully. It also has horizontal line on top of square root sign. I already have above image placed in my button. Thanks for the suggestion – YuDroid Sep 07 '11 at 05:58
-
If you don't like the unicode symbol, just make the icon and use it instead of text. – inazaruk Sep 07 '11 at 06:40
3
Copy this and paste in your String resource file.
<string name="sqr_root">√¯¯</string>
Here is the Result:

Glorfindel
- 21,988
- 13
- 81
- 109

PH7
- 3,926
- 3
- 24
- 29
-
1http://www.atm.ox.ac.uk/user/iwi/charmap.html I always refer this site for any special characters came across during my projects. – PH7 Sep 07 '11 at 08:49
2
Well you can have it like this,
√ - Alt+251
Also look at this link - ASCII
Else you can use the image of square root and include inside a button using the property
android:drawableRight="@drawable/square_root"

Lalit Poptani
- 67,150
- 23
- 161
- 242
-
Please see the image I included carefully. It also has horizontal line on top of square root sign. I already have above image placed in my button. Thanks for the suggestion – YuDroid Sep 07 '11 at 06:05
-
Means its working in my iPhone app perfectly. But I dont know the same for android. – YuDroid Sep 07 '11 at 06:23
-
Well, you can copy that Image and keep on the Button for working in Android. – Lalit Poptani Sep 07 '11 at 06:26
2
You should be able to put √ into the string resource.

Ben Williams
- 6,027
- 2
- 30
- 54
-
Please see the image I included carefully. It also has horizontal line on top of square root sign. I already have above image placed in my button. Thanks for the suggestion – YuDroid Sep 07 '11 at 06:14