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

后端 未结 10 1551
南笙
南笙 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:45

    I found the answer, at least for me. It works on HTC desire and Sansung 3 low res.

    • Remove the viewport meta tags from the HTML.

    • In java apply the solution that can be found here.

      this.appView.getSettings().setSupportZoom( true ); //Modify this
      this.appView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR);//Add this
      

      Remember to test if WebSettings.ZoomDensity.FAR is available to your SDK version (7 and above).

提交回复
热议问题