Why Am I Not Able To Print Escape Sequence In Editext In Android?
I am getting a response from an API using HTTP POST request which contains which contains some escape sequences such as \n, \t etc. When i try to display it in editText it is displ
Solution 1:
First, set your editText in xml file like this:
<EditText
android:id="@+id/editText"
.
.
.
.
android:inputType="textMultiLine" >
now put your text with new line character -
et.setText("Compilation error \n compile");
This works, enjoy!!!
Solution 2:
Replace out1.substring(2,out1.length()-2)
with out1
.
Post a Comment for "Why Am I Not Able To Print Escape Sequence In Editext In Android?"