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 8561007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:24:19+00:00 2026-06-11T16:24:19+00:00

In Gingerbread, I had no issues with using smoothScrollToPosition() to scroll across dozens of

  • 0

In Gingerbread, I had no issues with using smoothScrollToPosition() to scroll across dozens of items at a time. After my Nexus S was upgraded to Ice Cream Sandwich, I noticed that no matter what I put in smoothScrollToPosition(), it will only scroll about a couple of hundred pixels in either direction, and then stop.

Is this a known issue with ICS? I’ve noticed this with the Galaxy Nexus as well. I’ve looked at a few other questions and tried a few different tricks, such as turning off calls to notifyDataSetChanged(), and posting the smoothScrollToPosition() as a delayed runnable, but unfortunately, it doesn’t want to scroll more than a hundred pixels or so before stopping. 🙁

  • 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-06-11T16:24:20+00:00Added an answer on June 11, 2026 at 4:24 pm

    Appears to be an issue with the duration required to finish the animation, the same issue is present with smoothScrollBy(int distance, int duration), at cursory glance, smoothScrollToPosition() is a friendly wrapper around smoothScrollBy() that does a lot of the legwork. smoothScrollBy() in turn is faking a “fling gesture”, as if a user had made the motion.

    smoothScrollBy really just posts the fling runnable that continues to repost itself till the duration runs out. Meaning that it simply computes the scroll offset required based on the offset it previously decided to move to, hence if duration runs out before it gets to the target offset, it stops at the last offset calculated. (Rather than all of sudden jumping to the target offset, which is perhaps more jarring as it would not be animated).

    The difficulty for the Android guys is determining how much to move by each run() call to reach the required offset because ListView cells (children) are entirely dynamic in height, so they can’t just do a simple distance calculation as the non-visible children’s height are unknown to them. It is the same reason the Android scrollbar can fluctuate in size as you scroll, it has to take a best guess at how big it should be based on what it is currently seeing.

    Anyway that doesn’t help you solve it but some one might find it interesting 🙂

    If you know you have static cell heights however, you can write your own method to calculate the distance and duration to pass to smoothScrollBy() yourself and have a static amount of time to move X distance. If you don’t, it will have to suffice to use the solution bigstones posted, which really is working because of the high SCROLL_DURATION of 1000ms. You can take the ICS version and change this attribute as well, rather than using the 2.2 version, which is not the root cause.

    You can also adapt those runnables with your own custom algorithm, it shouldn’t be too difficult to tweak things.

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

Sidebar

Related Questions

So today I upgraded from gingerbread to Ice Cream sandwich. Other changes I did
using gingerbread 2.3.4 api lvl 10. I am starting a service after boot completed.
After I have downloaded a gingerbread system build using the following commands, how do
I am using WebSQL for my PhoneGap application it is fine for GingerBread and
Can a program that is written using the gingerbread/froyo/eclair (e.g. 2.1, 2.2, 2.3 ->
I have a Gingerbread 2.3.4 powered Nexus S and I recently got some writable
I am using android x86 gingerbread live cd, when i am tring to give
My app runs great on the ICS emu. However, using Gingerbread, it crashes whenever
I updated my ADT to the latest version after Gingerbread was released. And now
SOLVED: I was using icons from sdk v9 (Android 2.3 Gingerbread) which seems to

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.