问题
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