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

  • SEARCH
  • Home
  • 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 6718061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:55:31+00:00 2026-05-26T08:55:31+00:00

scrollTo(int x, int y) says: x the x position to scroll to y the

  • 0

scrollTo(int x, int y) says:

x the x position to scroll to

y the y position to scroll to

onScrollChanged(int l, int t, int oldl, int oldt) says:

l Current horizontal scroll origin.

t Current vertical scroll origin.

What I would like to know and can’t find anywhere, is where is x,y? Top left? Center? I tried a few tests and can’t figure it out.

  • 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-26T08:55:31+00:00Added an answer on May 26, 2026 at 8:55 am

    After extensive research and testing I’ve finally understood how scrollTo() works.

    (0,0) are the coordinates to the top left corner of the View container. When scrolling to any (x,y) point, the top left corner of the View will be placed at the (x,y) coordinates.

    If the View is showing an image, Bitmap, larger than the View itself, scrolling to (0,0) will place the View in the center of the image. This way, the top left corner of the image will be located at (-dX/2, -dY/2) and the bottom right corner at (mW - dX/2, mH - dY/2). dX represents the difference between the widths of the image and the View. And dY represents the difference between the heights of the image and the View.

    In order to see the bottom right corner and not go passed it (lower or further to the right), this is the proper call: scrollTo(mW - ivW - dX/2, mH - ivH - dY/2);

    The attached image shows the graphical representation of the View and Bitmap image positioning.

    Graphical representation of the relationship between the image and the view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the JQuery scrollTo plugin on our one-page site to vertically scroll between
I am using jQuery's scrollTo to make relative adjustments in the position of content
Scope I need to scroll to certain position smoothly and then "jump" to another
I am trying to set the position of the horizontal scrollview so it corresponds
How would I calculate the scrolling momentum for a scroll event? I understand that
I cannot set the position of my Horizontal ScrollView in my main.xml because I
I'm using scrollto, and I'm wanting to have a class added when it scrolls
I am using the jQuery scrollTo plugin as you can see on the page
I'm using the Jquery ScrollTo plugin: http://demos.flesler.com/jquery/scrollTo/ and it works fine, but I have
I'm trying to use jQuery.scrollTo plugin with accordion (where one block expands after clicking

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.