title: How can i load image url to fit my webview in android?
body: <p>I am developing an android application.Here i am displaying a url image in webview. But the image is not fit to my webview. some one is suggested to use viewport concept. But i am not able to use that perfectly. I attached my issue in drawing form with explanation. I used </p>
  
  <pre><code>mWebView.getSettings().setUseWideViewPort (true);
  </code></pre>
  
  <p>but not get the good result.
  I need to show the fitted image in all resolution devices including 7inch, 10 inch tablets.
  So please look at the attached image and suggest me the right way to fit url image in my webview place. I would like to show my image same as in 3rd diagram.</p>
  
  <p>Here is my code for loading image:</p>
  
  <pre><code>webView = (WebView) findViewById(R.id.webimage);
          WebSettings webSettings = imageView.getSettings(); 
          webSettings.setLoadsImagesAutomatically(true);
          webSettings.setSupportZoom(true) ;
          webSettings.setBuiltInZoomControls(true);
          webView.setBackgroundColor(Color.TRANSPARENT);
          webView.getSettings().setUseWideViewPort (true);
          webView.getSettings().setLoadWithOverviewMode(true);
          webView.setWebViewClient(new WebViewClient()
          {
          //some dialog implementation
          }
          webView.loadUrl(myurl);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/baXrL.jpg" alt="enter image description here"></p>