1
votes

I have a webview in a linear layout, which loads images from url on button click, and I wanted them to fit the screen exactly in the beginning, so I used

webview.getSettings().setLoadOverViewMode(true); webview.getSettings().setUseWideViewPort(true);

before adding these, the zoom control buttons were working as I wanted them to, but after adding these, zoom doesnt seem to work, either it force closes or just closes the webview itself.

I am a newbie to android programming, and i tried searching with similar question, couldnt find anything, so any advise would be helpful.

Thanks

2

2 Answers

1
votes

Try using :

webview.getSettings().setBuiltInZoomControls(true);
webview.getSettings().setSupportZoom(true);
0
votes

setLoadOverViewMode means it will load the webview completely zoomed out. I guess that is the reason zoom controls dont work