开发者

Android newline in my EditText

i got some data like this "line 1 \n line 2" from my distant server by using json with utf8 encoding, and when i try to put the data in my EditText the newline 开发者_开发问答\n doesn't work in spite of unscaping the data by using URLDecoder.decode() because i use databases. Any suggestions

all the best .


Solved , by using

myString.replace("\\n", "\n");


String value=userdataArrayList2[0].toString().trim().replace("\\n", "\n");

In back end database insert data like this :

name is osama\nibrahim 

result:

name is osama
ibrahim
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜