Line feeds in text object

OK I have this code

local myText = display.newText("", 300, 100, native.systemFont, 12)
myText:setTextColor(255, 255, 255)

myText.text = “Hello World!\nand hello from me\and from me too\noh yes and from me too”
myText.size = 26

All looks fine on the simulator (I get the 3 lines of text) but when ported to my Android the line feeds don’t work instead I get little square symbol where the line feed would have been and all text in one line.

Any ideas as to why the \n standard code won’t work on builds?

I have searched forums but can’t find any leads

Help! [import]uid: 40581 topic_id: 15303 reply_id: 315303[/import]

Android does not support line feeds. Last I checked, iOS does not either… nor does the simulator for Windows.

You will have to split the text into separate text objects yourself… or use native.newTextBox() which display a native widget that supports multiline text, which by default does not allow the user to edit the text. [import]uid: 32256 topic_id: 15303 reply_id: 56541[/import]

Hmmm…well I can tell you that the Simulator in Windows does…haven’t checked Mac Simulator [import]uid: 40581 topic_id: 15303 reply_id: 56643[/import]

Our Windows version supports new lines? Hmm… it’s not too often we add features by accident. :slight_smile:

But yeah, we added the native.newTextBox() feature to do this very thing. In fact, this text box is scrollable too. The one downside is that it is not supported by the simulator. [import]uid: 32256 topic_id: 15303 reply_id: 56711[/import]