Cata
Cata

Reputation: 11211

Android WebView scroll down

Is there a method or something to scroll de WebView at the bottom of the page.. I am using a WebView in a chat client as chatboard, and I want to scroll the page down as the user writes some text...

Thank you very much.

Upvotes: 7

Views: 8740

Answers (2)

Yat3s
Yat3s

Reputation: 330

   public void scrollToBottom(boolean animate) {
        if (animate) {
            pageDown(true);
        } else {
            scrollTo(getScrollX(), computeVerticalScrollRange());
        }
    }

Upvotes: 0

mdelolmo
mdelolmo

Reputation: 6447

At Webview's reference.

public boolean pageDown (boolean bottom)

Since: API Level 1 Scroll the contents of the view down by half the page size.

Parameters: bottom true to jump to bottom of page.

Returns true if the page was scrolled

Does this work for you?

Upvotes: 12

Related Questions