Twilie2012
Twilie2012

Reputation: 79

Zoom image in Webview

I have an image and other elements (div, titles etc.) in my webview and i need only the image to zoom on click, like picture in gallery. Something like in this tutorial. but in webview. I only found, how to zoom whole webview.

Upvotes: 3

Views: 4556

Answers (1)

Piyush
Piyush

Reputation: 18923

You can use this.

 webview.getSettings().setJavaScriptEnabled(true);
 webview.loadUrl("file:///android_asset/images/yourimage.png");
 webview.getSettings().setSupportZoom(true);  
 webview.getSettings().setBuiltInZoomControls(true);

Upvotes: 6

Related Questions