Monday 15 April 2013

string - Java \n line separator not working -



string - Java \n line separator not working -

i creating application has info log. build info string add together everytime application receives info , display in edittext box. problem having display info without new lines. basic illustration of code:

string logtext; edittext etlog; logtext = info + "\n" + logtext; etlog.settext(logtext);

know can utilize nl = system.getproperty("line.separator"); new line i'm puzzled why "\n" not working when i've used in different apps i've created before. thanks

not overly keen on answering own question solved changing inputtype of edittext textmultiline in xml code. xml code:

android:inputtype="textmultiline"

allows edittext create utilize of "\n" within string.

java string performance syntax newline

No comments:

Post a Comment