Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Limiting Zoom Out in Webview

I have to display an area map in my application. This map is provided as a large jpg file (>1000px * 1000 px). I display it in a webview and I also use the build in zoom controls and the zoompicker, which works pretty well. Now I want to limit the zoom, so that the image can't be smaller than the listview height. Because when I zoom out, and the image gets smaller, a white area is display underneath the webview and this is whatI want to avoid.

Regards, Hof

like image 740
Romanski Avatar asked Oct 11 '22 09:10

Romanski


1 Answers

Insert this meta tag in the head element:

<meta name='viewport' content='target-densitydpi=device-dpi,initial-scale=1,minimum-scale=1,user-scalable=yes'/>
like image 117
alaeri Avatar answered Oct 20 '22 09:10

alaeri