Issue
How can I get the certain parts from Website and show in WebView, Android Studio???
Below Image is that I want get part (square in red part)

and site is this : https://kimpga.com
I'd like to display only the red part as an Android web view. What should I do?
and then I used this method: webView.loadUrl("javascript:document.getElementsByClassName('').style.display='none'");
but that website doesn't have div id and doesn't work method!
+) add homepage source
Please understand to attach the overall picture. I'd like to show you the part of div selected in blue through a web view.
Solution
I solved it!
using
mWebView.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView webView, String url)
{
webView.loadUrl("javascript:(function() { " +
"document.getElementsByClassName(//classname//)[index of document].style.display='none'; " +
"})()");
}
});
Answered By - mono

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.