Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pDialog = new ProgressDialog(Units.this);
- pDialog.setTitle("Please Wait");
- pDialog.setMessage("Loading...");
- pDialog.setIndeterminate(false);
- pDialog.setCancelable(false);
- webview = (WebView) findViewById(R.id.webView1);
- webview.getSettings().setJavaScriptEnabled(true);
- webview.setWebViewClient(new WebViewClient() {
- @Override
- public void onPageStarted(WebView view, String url, Bitmap favicon) {
- super.onPageStarted(view, url, favicon);
- pDialog.show();
- }
- @Override
- public void onPageFinished(WebView view, String url) {
- super.onPageFinished(view, url);
- pDialog.dismiss();
- }
- });
- String pdf = "http://XX.xxx.xx.xxx/webservice/testbook.pdf";
- webview.loadUrl("http://docs.google.com/gview?embedded=true&url=" + pdf);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement