title: Unable to hide webview after url loads
body: <p>I am using the following code to hide the webview if a url ends with a particular string.</p>
  
  <pre><code> webview.setWebViewClient(new WebViewClient() {
      @Override
      public void onPageFinished(WebView view, String url) {
          if (url.endsWith("index.asp")) {
               Toast.makeText(getActivity().getApplicationContext(),"Login successfull",Toast.LENGTH_LONG).show();
              webview.setVisibility(view.GONE);
          }
      }
   });
  </code></pre>
  
  <p>but the webview still remains if the url ends with index.asp( for example "<a href="http://abc.def/index.asp" rel="nofollow">http://abc.def/index.asp</a>")</p>