hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
408 stars 51 forks source link

Why is it impossible to use pinch to zoom ? #256

Closed jean-francois-labbe closed 1 year ago

jean-francois-labbe commented 1 year ago

I'm using turbo-android and I'd like to allow users to zoom-in some images. How can I do that ?

I've checked the viewport: <meta content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"> Tried to use webView.settings.setSupportZoom(true) without success.

jayohms commented 1 year ago

We use the following viewport attributes in the HEY app when we conditionally enable page zoom:

width=device-width, initial-scale=1, maximum-scale=2.5

Additionally, on the Android side, we set:

webView.settings.builtInZoomControls = true
webView.settings.displayZoomControls = false
jean-francois-labbe commented 1 year ago

Thanks a lot. indeed it's working now.