Example usage for android.widget ZoomButtonsController setVisible

List of usage examples for android.widget ZoomButtonsController setVisible

Introduction

In this page you can find the example usage for android.widget ZoomButtonsController setVisible.

Prototype

public void setVisible(boolean visible) 

Source Link

Document

Sets whether the zoom controls should be visible to the user.

Usage

From source file:Main.java

private static void getControlls(WebView pWebView) {
    try {//w  w  w  .  j ava2s  . c om
        Class webview = Class.forName("android.webkit.WebView");
        Method method = webview.getMethod("getZoomButtonsController");
        ZoomButtonsController zoomController = (ZoomButtonsController) method.invoke(pWebView);
        if (zoomController != null) {
            zoomController.setVisible(false);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}