Android webview only

I have html output that is fullscreen from the start. With zoom control, I can zoom in / out.

I just want to zoom in, not get out. So: the minimum reduction I want is 100% of the full screen. And the maximum increase I want is up to 400%.

Is there any way to do this?

thanks

+2
source share
2 answers

Performing this, I would suggest

  • disable built-in zoom controls through WebSettings.setBuiltInZoomControls (false)
  • add custom zoom controls over WebView using the FrameLayout function
+1
source

If you can change the displayed html code, I would suggest making it a simple way. insert this meta tag into the head element in HTML

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

You can change the minimum scale value to suit your needs.

+3
source

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


All Articles