Reputation: 5495
I have a string from a web service such as
Name „Hi!
Which it should be
Name „Hi!
How can I display this in a TextView ?
Because currently, I only see it as the first example.
Upvotes: 0
Views: 66
Reputation: 98
you will need to convert the received string to html and back to string. Html.fromHtml(value) will convert the received value to html. calling .toString() will return you the string (without any html tag )
// import this package
import android.text.Html;
String value ="Name „Hi!";
String formattedValue = Html.fromHtml(value).toString().trim();
Upvotes: 1