I'm displaying a PDF
document using WebView
in android. Problem is when document is scrolled, it's lagging, though the document which I'm trying to show is only 3 pages. I am unable to figure out the issue.
This is my code:
mWebView = (WebView) findViewById(R.id.webView1);
mWebView.getSettings().setJavaScriptEnabled(true);
final String doc="https://docs.google.com/gview?embedded=true&url=http://xxx.xx.xx.xxx:8001/ql/SignedAgreement/example.pdf&overridemobile=true";
mWebView.loadUrl(doc);
Tried using android:hardwareAccelerated="true"
in the manifest file. It didn't help either.
Android version used: 4.1.1
Device: Lenovo IdeaPad A2109
It's showing same behavior in other devices too.