android - 使用 WebView 查看文档时如何隐藏 Google Doc 的下载选项?

标签 android google-docs

以下代码在页面上有下载选项。我想删除此选项,只授予访问者读取权限而不是下载权限。

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);

最佳答案

使用 jsoup 使用 http 连接解析 html ....捕获下载链接所在的标签并禁用它...解析需要几秒钟但有效工作...

关于android - 使用 WebView 查看文档时如何隐藏 Google Doc 的下载选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12896379/

相关文章:

android - 将 facebook 的个人资料图片设置为 LinearLayout 背景

android - View 顶部的搜索栏

curl - 使用共享 URL (AuthKey) 通过 API 访问 Google Doc?

google-apps-script - Google 电子表格中带有条件格式的色阶

android - 检查 Cordova/Phonegap 是否正确

android - 按下和释放按钮的监听器

Android Studio 总是为每个新项目下载 gradle?

google-apps-script - 在没有随机 Utilities.sleep 的情况下处理 UrlFetch 速率限制的正确方法?

java - Google docs api -- 上传 XML 文档

javascript - jQuery 检查和更改自定义 Google 电子表格页面上的输入和下拉列表