When I have a TextView
with a long text, I usually have to leave it in one line which is later very hard to edit. If I use any kind of formatting, like on this image
Then I get an error.
I would like to know how to format such long text into multi-line text without producing errors?
EDIT
I was not precise in my Q. It seems that this can be solved in Eclipse. The problem is IntelliJ IDEA and its formatting command Ctrl+Alt+L which does not pass by compiler in the file strings.xml. The snapshots are from that IDE.
The issue with the code formatter breaking XML text is known and will be fixed in an upcoming version if IJ. At least in the case shown here: http://youtrack.jetbrains.net/issue/IDEA-69506?projectKey=IDEA
Had the same problem a few weeks back and found that there is no good way to do this. If you want the output text in your app to have multiple lines, you can simply insert "\n" as many times as you want, but if you're talking about it wrapping in the editor only, Eclipse does not support this natively.
However, I did find this: http://ahtik.com/blog/projects/eclipse-word-wrap/
A nice project left over from Google's summer of code a few years ago, it does visual word wrap only so I don't think it will affect the compilation process, which should prevent those errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With