Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an infinity sign on Android?

I know there's this question, but '\u221e' doesn't work for me. Also this is Android-specific. Surely there must be a way to show an infinity sign!

like image 673
Oleksiy Avatar asked May 08 '14 16:05

Oleksiy


2 Answers

Never mind, found it myself:

DecimalFormatSymbols.getInstance().getInfinity()

Note that it may not work with some custom fonts.

like image 65
Oleksiy Avatar answered Oct 08 '22 17:10

Oleksiy


You can create a new item in "strings.xml":

<string name="infinity">&#8734;</string>

And then call it using your Context:

textView.setText(context.getString(R.string.infinity));
like image 40
Dmitriy Chernenko Avatar answered Oct 08 '22 17:10

Dmitriy Chernenko