L
L
leha782016-09-13 08:47:59
Android
leha78, 2016-09-13 08:47:59

How to remove html tags in application?

The data is taken from the site and displayed in the application. In the body field, the editor on the site automatically sets the tag, on the site this is the required tag, but in the Android application, the tags do not work and the text is displayed as is (together with the tags). How can I make the tags apply in the application too? Or even how to remove them.
Another question about text formatting. The application has an About us activity, where data will also be taken from the site. And it is planned to make indents (paragraphs) in the text, how can they be done, while I only see that this can be done with the same tag

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
davidnum95, 2016-09-13
@leha78

textView.setText(Html.fromHtml(yourHtml))
Just be careful, this method is deprecated

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question