简体   繁体   中英

Rss feed in webview in android

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

If you just want to display HTML you can look into android.text.Html .

You will need to use a custom adapter so you can control the display of the list view, so when you output the content you can do something like:

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM