在android中预览时禁用下载选项

时间:2013-09-28 07:02:30

标签: android

enter image description here

当我尝试在Android应用程序中打开它时,如何禁用下载和桌面选项。

WebView mWebView = (WebView) findViewById( R.id.WebView01);
String pdfurl = ""; // Url of pdf or doc file.

String weblink="http://docs.google.com/gview?embedded=true&url="+pdfurl;    
mWebView.loadUrl(weblink);

1 个答案:

答案 0 :(得分:0)

尝试使用全屏幕pdf

 private void updateFullscreenStatus(boolean bUseFullscreen)
    {   
       if(bUseFullscreen)
       {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        }
        else
        {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        }

        m_contentView.requestLayout();
    }