Search code examples
pdfiframegoogle-apiandroid-webview

how to remove pop-out and zoom button google doc?


I am loading the pdf documents in WebView through appending the pdf url to google doc api

http://docs.google.com/gview?embedded=true&url=myurl

Pdf is loading just fine but the webpage displays two options - Zoom-in and Pop-Out. Is there any way to disable/hide pop-out option and zoom button? Any help would be appreciated.Thanks in advance!


Solution

  • I have use it and its working fine for pop out click disabled.

    webview.setWebViewClient(new WebViewClient() {
        @Override
        public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
        {
        }
    
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            return true;
        }
    
        @Override
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);
        }
    
        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            super.onPageStarted(view, url, favicon);
        }
    })