Android: restriction on reduction in Webview

I need to display a map of the area in my application. This map is provided as a large jpg file (> 1000px * 1000 px). I show it in a webview, and I also use the built-in zoom controls and a photopixer utility that works very well. Now I want to limit the scaling so that the image cannot be less than the height of the list. Because when I zoom out and the image gets smaller, the white area is displayed under the webview, and this I want to avoid.

Regards, Hof

+4
source share
1 answer

Insert this meta tag into the head element:

<meta name='viewport' content='target-densitydpi=device-dpi,initial-scale=1,minimum-scale=1,user-scalable=yes'/> 
+4
source

Source: https://habr.com/ru/post/1346564/


All Articles