سؤال

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