Search code examples
androidwebview

Android webview only zoom in


I have a html output, which is full screen at the start. With the zoom control I can zoom in/out.

I want only zoom in, and not out. So: the minimal zoom out I want is 100% of the full screen. And the maximal zoom in I want to 400%.

Is there a way to do it?

Thanks


Solution

  • Doing it the hard way, I would suggest to

    • disable the built-in zoom controls via WebSettings.setBuiltInZoomControls(false)
    • add your own zoom control buttons on top of the WebView using FrameLayout