I wanted to know if it was possible to display only certain parts of a website in a WebView. For example I have this website with the following html:
<html>
<body>
<div id="1">ID 1</id>
<div id="2">ID 2</id>
<div id="3">ID 3</id>
</body>
</html>
it is possible to display in WebView only, for example, the contents of the div with id="3"? My code is WebWiew:
WebViewClient WebClient = new WebViewClient(){
public boolean shouldOverrideUrlLoading(WebView view, String url){
view.loadUrl(url);
return true;
}
};
WebView myWebView = (WebView) findViewById(R.id.webView1);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.getSettings().setBuiltInZoomControls(true);
myWebView.getSettings().setBuiltInZoomControls(true);
myWebView.setWebViewClient(WebClient);
myWebView.loadUrl("https://www.example.com");