How do I display content from feedburner in WebView in Full HTML?

我们两清 提交于 2019-12-10 10:19:56

问题


I am using a WebView to display this feedburner. When I view this link in Google Chrome and in the device's browser it shows the title, snippet, links, and most importantly a podcast file and other hyperlinks. However, when I view this link in my WebView it only shows it in Plain Text HTML with no hyperlinks. All i see is a title and the story snippet, followed by HTML source code. Is there a particular that must be enabled to resolve this?

These are my WebView settings:

newsfeed = (WebView) findViewById(R.id.webViewnews);
newsfeed.getSettings().setJavaScriptEnabled(true);
newsfeed.setVerticalScrollBarEnabled(false);
newsfeed.getSettings().setPluginsEnabled(true);

How I load the URL:

try {
    newsfeed.loadUrl("http://feeds.feedburner.com/fsn");
} catch (Exception e) {
    e.printStackTrace();
}

回答1:


I'm seeing what you are seeing, list of entries with Title followed by html of article content on the Stock Browser - Motorola Droid running 2.2.3. My guess is that this is the format that the site provided for the stock Android WebView User Agent. Google Chrome is NOT the stock browser that comes with Android Open Source Project and does more under the hood to render content.

I would try a different user agent first to see if the webview will render the content. Note that they may be using various Javascript libraries which don't work well with Android which is why you are seeing the 'simplified' content.



来源:https://stackoverflow.com/questions/11821233/how-do-i-display-content-from-feedburner-in-webview-in-full-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!