I am working on an E-mail Application where I have to send and receive and also have to display email in TextView
when ever user wants to read it
This is the feed I am getting from API :-
{
"messages":
[{"id":"136902",
"from":"Akash",
"email":"akash@email.com",
"subject":"mail App!!",
"message":"Hi Devraj,\n\n \n\nKindly provide sabmail apk for google play store.\n\n \n\nRegards,\n\nAkash",
"date":"1448870780",
"userid":"75",
"recipients":"devraj@mail.com ",
"status":"0",
"isread":"1",
"priority":"3",
"size":"3057"}
]}
I am taking the "message" tag and displaying it in TextView
. It looks like this
Hi Devraj,Kindly provide mail apk for google play store.Regards,Akash,
But, I want it to be look like this,
Hi Devraj,
Kindly provide mail apk for google play store.
Regards,
Akash,
How can I do achieve this.
This is the way I am setting it in TextView
String msg = messageDisc.getMessage();
Spanned sp = Html.fromHtml(msg);
emailText.setText(sp);
emailText.setMovementMethod(LinkMovementMethod.getInstance());
Please let me know what mistake I am doing here.