I am using gview of Google Docs to display document files but I cannot get scroll position as well as set scroll offset to force document view jump to any positions.
Here is my code:
String url = "https://dl.dropbox.com/s/8wubzwsbcafqxmt/GMAT-Vocabulary-List.pdf?dl=0";
webView.loadUrl("https://docs.google.com/viewer?url=" + url + "&embedded=true");
public boolean onTouchEvent(final MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_MOVE) {
int xPos = webView.getScrollX();
int yPos = webview.getScrollY();
Log.d("Scroll", "xPos = " + xPos + ";yPos = " + yPos);
}
return false;
}
The logcat is always like this: "xPos = 0;yPos = 0".
And nothing happens when I set webView position like this:
webView.setScrollY(1000);
I have no idea why!
I searched and tried many solutions but this problem is still not resolved. Could you please show me some ways to resolve this problem.
Thank you in advance!