title: howto handle mailto: in android webview
body: <p>I am trying to intercept mailto: links in an embedded webview in my app.  What I have is working ok, except when the user presses the link it is blurred upon returning to the app.  Here is what I am doing in my WebViewClient</p>
  
  <pre><code>    @Override
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
      if(url.startsWith("mailto:")){
          url = url.replaceFirst("mailto:", "");
          url = url.trim();
          Intent i = new Intent(Intent.ACTION_SEND);
          i.setType("plain/text").putExtra(Intent.EXTRA_EMAIL, new String[]{url});
          context.startActivity(i);
          return true;
      }
      context.findViewById(R.id.loadingBar).setVisibility(View.VISIBLE);
      view.loadUrl(url);
      return true;
  }
  </code></pre>
  
  <p>If I do a view.reload() it does fix the problem, but is there a better way to fix it without wasting the bandwidth?  I tried invalidate() but it didn't work. </p>
  
  <p>here is an example of what I'm talking about <img src="https://i.stack.imgur.com/PsqPK.jpg" alt="alt text"></p>