How to safely turn WebView zooming on and off as needed

前端 未结 9 1253
后悔当初
后悔当初 2020-12-15 01:06

As mentioned in this unanswered question: WebView throws Receiver not registered: android.widget.ZoomButtonsController

By turning the WebView zoom controls on and of

9条回答
  •  醉酒成梦
    2020-12-15 01:38

    If you are stumbling upon this question, be sure to check the bug report first to see what the status is from Google, but otherwise here is a workaround that is working so far so good for me:

    Add this line to your onDestory() method:

    webView.getSettings().setBuiltInZoomControls(true);
    

提交回复
热议问题