WebView getting rid of double tap zoom.

后端 未结 6 952
悲&欢浪女
悲&欢浪女 2020-12-19 03:18

I read many tickets on the topic of Zooming in WebViews and didnt came to an answer for my case.

Here´s my setup:

I´m using a custom webview with generally

6条回答
  •  春和景丽
    2020-12-19 03:32

    There's a fantastic solution for your issue, based on Javascript (so you'll have to have access to the HTML/JS code in the remote side, if it's the case).

    Using the FastClick library, all you need to do is to add the .js file and then call it:

    
    
    
    

    This will get rid of the double tap zoom, and there's still (in my opinion) a huge bonus: all taps get 0.3 seconds faster, due to the fact the system doesn't have to wait anymore for a double tap! Check this example on Android to see the difference: Practical Example

    Well, I don't know if this solution will fit in your case, but it was a perfect solution for my Webview projects. Hope it helps!

    ps1: you have to add the code above in all pages and frames

    ps2: the pinch zoom will keep working normally

提交回复
热议问题