I have a problem with default zoom on WebView. When I load the URL I have my image not adjusted to screen (it is too small and it is in the right-top side).
I would like to have the initial zoom like in ImageView.
This is my actual code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webView=new WebView(this);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.loadUrl(URL);
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
addContentView(webView, params);
}
and I get this effect with it:

I would like to have it looks like this (I got it using ImageView):

How can I get this effect using WebView?
I would check two things:
<img src="...">, right? You’ll probably have to style the image to fit the width of the screen. (see this) Instead of using an image tag you could also set the background of the html to use that image (see this)