0

I want to be able to autoscroll the page. Below is my method.

public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    WebView wv = (WebView) findViewById(R.id.webView1);
    wv.loadUrl("file:///android_asset/1.html");
  }
}

Edit: I don't want it to auto scrolled all the way to the bottom or top I want to autoscroll with speed so it goes to the bottom slowly.

ivesingh
  • 888
  • 3
  • 12
  • 30

1 Answers1

0

You could use a ScrollView enclosing your WebView in your main layout, and scroll it programmatically.

Mena
  • 47,782
  • 11
  • 87
  • 106
  • Thanks but that scrolls all the way to the bottom, I want to be able to autoscroll slowly with given speed. – ivesingh May 09 '13 at 16:27
  • I tried webview.scrollBy(x,y) but I am having another issue as posted in this question: http://stackoverflow.com/questions/16467219/stop-when-webview-is-at-the-end – ivesingh May 09 '13 at 17:45