0

I have to make an improvement to my webview application. But I couldn't figure out how or where to do it. I'm kind of a novice about android also i want to remove ads from webview.

Here's exactly what I want

When the user navigating within the app opens the link to "

https://www.xxxxxx.com/m/messages.php?display=one_chat&user_id=180045

I want the ad-free layout to load.

I'd appreciate it if you'd explain it with a small sample.

Kaushik Burkule
  • 816
  • 1
  • 12
  • 27
enver K
  • 3
  • 2

1 Answers1

0

I solved this problem, the solution was quite easy.

//Show loader on url load public void onLoadResource (WebView view, String url) {

            if (!datingView.getUrl().contains("messages.php") || !datingView.getUrl().contains("messages.php" +
                    "")){
                bannerAds.setVisibility(View.VISIBLE);
            }else{
                bannerAds.setVisibility(View.GONE);
            }

            // if url contains string androidexample
            // Then show progress  Dialog
            if (progressDialog == null && url.contains("instasquare")
                    ) {

                // in standard case YourActivity.this
                progressDialog = new ProgressDialog(appMain.this);
                progressDialog.setMessage("Loading...");
                progressDialog.show();
            }
        }
enver K
  • 3
  • 2