简体   繁体   中英

Large ListView bounces off the top when scrolling fast

I have recently implemented infinite scrolling in a View in my Android application. I am using a ListView and i have noticed the problem when having relatively many items in the List - currently around 200.

The problem appears when scrolling really fast from the bottom half of the List to the top. The scrolling seems to Bounce off the top and starts scrolling down instead, sometimes all the way to the bottom of the List. I have noticed that the problem only occurs when using the default Overscroll mode (Problem is not reproduced when setting it to "never"). However, as far as I know, using Overscroll shouldn't result in a bouncing behaviour - only show some drawable indicating that the user reached the the boundary of the List.

Note: The problem only occurs when scrolling from down and up, not when scrolling from up and down.

I'm currently suspecting that there is a Bug in ListView or perhaps in SwipeToRefreshLayout (which is wrapping the ListView). Does anyone have any input on this matter? Have I missed something? Is there a Bug? If requested, I might post some code, but I haven't done anything special and nothing that could trigger this behaviour.

Environment info:

  • Unrooted Sony Xperia Z3
  • Android 5.1.1 Lollipop
  • Support-Fragment based application.
  • Support Library App Theme

Hupp, found it. It's a bug in ListView...

https://code.google.com/p/android/issues/detail?id=159739

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM