Code example for ZoomButtonsController

Methods: getZoomControls, setZoomInEnabled, setZoomOutEnabled

0
        if (!canZoomIn && !canZoomOut) {
            // Hide the zoom in and out buttons if the page cannot zoom 
            mZoomButtonsController.getZoomControls().setVisibility(View.GONE);
        } else { 
            // Set each one individually, as a page may be able to zoom in or out 
            mZoomButtonsController.setZoomInEnabled(canZoomIn);
            mZoomButtonsController.setZoomOutEnabled(canZoomOut);
        } 
    } 
 
    private class ZoomListener implements ZoomButtonsController.OnZoomListener {
        @Override 
        public void onVisibilityChanged(boolean visible) {
            if (visible) {
                // Bring back the hidden zoom controls. 
                mZoomButtonsController.getZoomControls().setVisibility(View.VISIBLE);
                updateZoomControls(); 
            } 
        } 
 
        @Override 
        public void onZoom(boolean zoomIn) {
            if (zoomIn) {
                mContentViewCore.zoomIn();