문제

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!

도움이 되었습니까?

해결책

Never mind, found it myself:

DecimalFormatSymbols.getInstance().getInfinity()

Note that it may not work with some custom fonts.

다른 팁

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));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top