Closed liuyunzyj closed 4 years ago
The zoomable prop only works on iOS when disable scalesPageToFit.
scalesPageToFit={false}
zoomable={false}
scalesPageToFit={false}The view cannot hold the width and will display incomplete
@iou90 How do you get to a normal display that only shows half of the original content
@liuyunzyj
scalesPageToFit
viewportContent={'width=device-width, user-scalable=no'}
Above codes should work on iOS from v1.4.0. Please note that 'width=device-width' with scalesPageToFit may cause some layout issues on Android, for these conditions, using customScript prop to apply custom viewport meta. FYI: https://github.com/react-native-community/react-native-webview/blob/master/docs/Reference.md#scalespagetofit https://github.com/react-native-community/react-native-webview/blob/5b0c634f15dbf8eb8210d4393da9ca86df1de453/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java
@ReactProp(name = "scalesPageToFit")
public void setScalesPageToFit(WebView view, boolean enabled) {
view.getSettings().setLoadWithOverviewMode(enabled);
view.getSettings().setUseWideViewPort(enabled);
}
https://developer.android.com/reference/android/webkit/WebSettings.html#setUseWideViewPort(boolean) https://developer.android.com/reference/android/webkit/WebSettings.html#setLoadWithOverviewMode(boolean)
<AutoHeightWebView