I am trying to split the single string in to two lines using \n in android but it shows as it is with \n too. I am expecting below,
String new = "Hi, How are you";
In EditText box I need,
Hi, How are you
I know its simple question but I couldn't find a solution.
I think you are new into android development like me. It's really easy to do...
You just have to do this:
editText.setText("Hi,\nHow are you?");
It's "\n" - a backslash, not a forward slash.
See this related question for more information about how to make a multiline text view look right.
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