I have long text containing name that looks like "something-something". This long text is shown in TextView. The problem is "something-something" got line breaked.
I have found unicode character U+2011 NON-BREAKING HYPHEN. But it looks like this unicode character is supported in font since Android 3.0. However I'm supporting Android 2.1 where replacement character is shown instead.
I have looked at class Spannable, but I did not find how to define nonbreaking block of text. Maybe I overlook something.
I solved breaking of the text block by implementing
ReplacementSpan
to render text in single block. Here is the code: