0

I have a problem with long messages in alert dialog. For some reason if text do not fit in a single line words are splited in the half instead of moved to the next line. For example text like

aaaa bbbb cccc dddd eeee ffff gggg hhhh

is displaying like

aaaa bbbb cccc dd
dd eeee ffff gggg
hhhh

instead of

aaaa bbbb cccc
dddd eeee ffff
gggg hhhh

Does anyone know how to fix it?

Greg
  • 1,152
  • 1
  • 12
  • 28

1 Answers1

0

You can just start new lines where necessary:

.setMessage("These words will be on line 1" + "\n" + "These will be on line 2")

The \n starts a new line.

Zach H
  • 257
  • 1
  • 3
  • 15