Is there a way to disable the zoom feature on input fields in webview?

后端 未结 10 1423
南笙
南笙 2021-02-05 21:18

When a user clicks in an input field or textarea, the application zooms in. Is there a simple way to disable it?

Currently have the meta tag:

meta name=\         


        
10条回答
  •  你的背包
    2021-02-05 21:37

    webView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.MEDIUM); 
    

    This method was deprecated in API level 19.

    this works in the last android versions 4.4.2.

    webView.setInitialScale(0);//default,no zoom
    webView.getSettings().setSupportZoom(true);
    webView.getSettings().setBuiltInZoomControls(true);
    webView.getSettings().setLoadWithOverviewMode(false);
    webView.getSettings().setUseWideViewPort(false);
    webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    

提交回复
热议问题