Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6968533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:27:49+00:00 2026-05-27T16:27:49+00:00

I know in Scrollview you can access scrollView.getMaxScrollAmount however I don’t seem to understand

  • 0

I know in Scrollview you can access scrollView.getMaxScrollAmount however I don’t seem to understand how to call it on webview. I tried cheating to get the information about it. Here is what I tried.

What the method was suppose to do is that it continually scroll in a specific amount and checks if the value isn’t increased in that amount it gets that amount and returns it with the max value. However it doesn’t work.

public String scrollToMAX(){
        webView1.scrollTo(0, 0);
        Boolean istrue = true;
        String getIntData = "";
        int i = 0;
        while(istrue){
            int checker = webView1.getScrollY();
            if(i != checker){
                i = checker;
                getIntData = Integer.toString(i);
                istrue = false;
            }
            i=i+5000;
            webView1.scrollTo(0, i);
        }
        webView1.scrollTo(0, 0);
        return getIntData;
        //Put a return string here
    } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:27:50+00:00Added an answer on May 27, 2026 at 4:27 pm

    here you go: this is working perfectly for me (it scrolls to the end)

    the trick is in using the function getContentHeight of WebView

    package sherif.android.activity;
    
    import sherif.android.R;
    import android.app.Activity;
    import android.os.Bundle;
    import android.util.Log;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;
    
    public class WebClientTestActivity extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState); 
            WebView webView = new WebView(this);
            String UserAgent = "User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"; 
            //webView.getSettings().setUserAgentString(UserAgent); 
            webView.getSettings().setJavaScriptEnabled(true);
            webView.loadUrl("http://www.google.com/search?gcx=w&sourceid=chrome&ie=UTF-8&q=arsenal");
            webView.setWebViewClient(new WebViewClient(){
                @Override
                public void onPageFinished(WebView view, String url) {
                    Log.v("here","here");
                    view.scrollBy(0, view.getContentHeight());
                }
            });
            setContentView(webView);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't resolve my problem with scrollView and webView, I know, that i can't
I placed a few uiimageview objects into a scrollview. How can the imageview know
I am developing an Image Gallery using scrollview. I want to know can I
Know if it's possible to access the iPhone compass in Safari using JavaScript? I
I know that I can do something like $int = (int)99; //(int) has a
I have a Gallery that contains a ScrollView. I can scroll through the text
how can i get the image size when it's zoomed by user, i write
From Apple sample PageControl we can know that UIPageControl can be used to control
How is the current offset for a Scrollview accessed? I know the following [someScrollView
I am currently trying to use a ListView inside of a ScrollView. I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.