RSS feed in webview in android

I want to show rss feeds of a link http://dekora.com/blog/?feed=rss2 . I have done this successfully and I am showing it as a list. But I have one problem is that I want to display the tag element, but HTML tags appear here. So what should I do for this? Should I replace all HTML tags or is there a convenient way to display this tag element. Can I show this tag element in webview? On the iPhone, if we put this tag element in a webview, it shows things in a good and convenient way. Can any organ help?

+6
source share
1 answer

If you just want to display HTML, you can see android.text.Html .

You will need to use a custom adapter so that you can control the display of the list, so when displaying the contents, you can do something like:

lblRSSContent.setText(Html.fromHtml(rssItem.getContent())); 

I noticed that the provided rss feed also contains images. Therefore, you should also look into the Html.ImageGetter so that you can process and display images.

+2
source

Source: https://habr.com/ru/post/887099/


All Articles