0

I need to make a credits screen in my application. It would be vertically scrolling lines. It is html page with images so I can only use webview. Scrolling is to be performed automatically and no user interaction is allowed. Just like movie/serials credits that goes from bottom to top. I have html page added in assets folder.

How to implement this animation?

Mihir Shah
  • 1,799
  • 3
  • 29
  • 49

1 Answers1

0

Since you are using a webview, you can actually use jQuery to accomplish this.

$('a[href=#bottom]').click(function(){
    $('html, body').animate({scrollTop:0}, 'slow');
});

Slow down scroll to top event by jQuery animate

Or you could use a handler

private Runnable mScrollDown = new Runnable()
{
    public void run()
    {
        WebView webview = (WebView)findViewById(R.id.web_url);
        webview.scrollBy(0, scrollSpeed);
        mHandler.postDelayed(this, 200);
    }
};
Community
  • 1
  • 1
Bob
  • 127
  • 1
  • 14