I would like to show on the device’s screen only this
, without all the other unnecessary stuff , from this web page. This is my code so far…
package com.nextlogic.hellowebview;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class HelloWebView extends Activity {
/** Called when the activity is first created. */
WebView mWebView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl("http://golfnews.no/nyheter.php?a=2013");
}
}
Could you please help me ? It would be much appreciated. Thanks.
What you will need is a HTML Parser such as JSOUP. A great parser i use it for alot of projects.
This will allow you to parse only specific content,
Such as the image url from your webpage, and then retrieve it to a bitmap and set it to a imageview(Best to use an asynctask for this) and then you can use tags to retrieve the text.
Let me know if you need help with this.
EDIT: How to parse your Webpage with jsoup:
Try this out.
EDIT: How to add external jar’s