Bad text wrapping on Android

In using display.newText in an app that I developed for iOS and am now moving to Android, I found an annoying issue.

When you have text wrapping to multi-line, on Android, it appears to break text after a piece of punctuation, even if there is a valid character right after it, like a quotation mark. For example, if I have the string:
He said "There goes the neighborhood."

It could wrap like this:
He said "There goes the neighborhood.
"

It doesn’t do this on iOS that I have seen, though iOS could break up “A+” to two lines, like this:
**Johnny was so excited that he got an A

  • on his pop quiz.**

Why is it set up to do this? Shouldn’t it only wrap at an actual space?

[import]uid: 17827 topic_id: 34565 reply_id: 334565[/import]

Text is rendered by the operating system… and unfortunately iOS and Android handle line wrapping a little bit differently. That’s just the way it is.

I took a quick look at Android’s text rendering class (see link below). I’m not seeing any means of controlling how line breaks work.
http://developer.android.com/reference/android/text/StaticLayout.html

My advise is to set the text object a bit wider than you need it to be, if possible. [import]uid: 32256 topic_id: 34565 reply_id: 137465[/import]

The problem is that the text is all dynamic so I don’t know when it’s going to break badly. [import]uid: 17827 topic_id: 34565 reply_id: 137484[/import]

Text is rendered by the operating system… and unfortunately iOS and Android handle line wrapping a little bit differently. That’s just the way it is.

I took a quick look at Android’s text rendering class (see link below). I’m not seeing any means of controlling how line breaks work.
http://developer.android.com/reference/android/text/StaticLayout.html

My advise is to set the text object a bit wider than you need it to be, if possible. [import]uid: 32256 topic_id: 34565 reply_id: 137465[/import]

The problem is that the text is all dynamic so I don’t know when it’s going to break badly. [import]uid: 17827 topic_id: 34565 reply_id: 137484[/import]