From ca0c6dbe3632a4312dd0fa56be5ac47bc31e10a7 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 30 Jun 2016 07:33:56 -0700 Subject: [PATCH] Enable zoom on WebViews on Android Summary: Make the behavior on a WebView allow pinch to zoom. This matches what iOS has by default. We may want to at some point put this behind a property but right now just make it work on Android. Reviewed By: andreicoman11 Differential Revision: D3503429 fbshipit-source-id: adb2bb2c3de099aca08700786be7a132557a5e2a --- .../com/facebook/react/views/webview/ReactWebViewManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java index 586b071d5..11350d16e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java @@ -248,6 +248,8 @@ public class ReactWebViewManager extends SimpleViewManager { webView.setWebChromeClient(new WebChromeClient()); reactContext.addLifecycleEventListener(webView); mWebViewConfig.configWebView(webView); + webView.getSettings().setBuiltInZoomControls(true); + webView.getSettings().setDisplayZoomControls(false); if (ReactBuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { WebView.setWebContentsDebuggingEnabled(true);