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
This commit is contained in:
parent
bb0fda7d54
commit
ca0c6dbe36
|
@ -248,6 +248,8 @@ public class ReactWebViewManager extends SimpleViewManager<WebView> {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue