Search code examples
javaandroidcontrolscordovazooming

Always show zoom controls in WebView


Is there any way to always show zoom controls in webview? I found this: Always show zoom controls on a MapView but that's for the mapview. I want them to always be visible.

    super.onCreate(savedInstanceState);
    super.loadUrl("file:///android_asset/www/index.html");
    WebSettings ws = super.appView.getSettings();
    ws.setSupportZoom(true);
    ws.setBuiltInZoomControls(true);

Solution

  • setDisplayZoomControls() is only available from API 11 (Android 3). So you can't even consider using it until the vast majority of Android devices are 3 or above - which will not be for some years :(