Question

I need to include the following square root sign in my android as a Text resource in Button control. Any guesses?

Square Root Symbol

Was it helpful?

Solution

Copy this and paste in your String resource file.

<string name="sqr_root">√¯¯</string>

Here is the Result:

Square Root Symbol Result

OTHER TIPS

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" />

enter image description here

You should be able to put &#8730; into the string resource.

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"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top