我正在使用谷歌文档查看器在android显示pdf。我想删除弹出选项。请参阅所附的截图。Screenshot of google docs
下面是我在webview中加载的代码。
webview= (WebView) findViewById(R.id.text_studyguide);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("https://docs.google.com/viewer?embedded=true&url="+pdfURL);
webview.setWebViewClient(new Callback());
private class Callback extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(
WebView view, String url) {
view.loadUrl(url);
return false;
}
@Override
public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
super.onPageFinished(view, url);
}
}
2条答案
按热度按时间qojgxg4l1#
ccgok5k52#
Kotlin溶液: