简体   繁体   中英

listview resets/jumps to top when scrolling fast

I have a listview in a fragment that on a fast scroll, it jumps back to the top of the list. Sometimes it happens if you scroll really slowly too.

It seems to only happen on Galaxy Nexus and Galaxy S3, both of which are on 4.3. All other test devices we have are on 4.4 and they work fine.

I am seeing absolutely nothing in the logs when this happens, and am completely lost as to why this might happen.

I would post code, but there is a hell of a lot involved including animations on new items appearing and stuff. However, I've removed a lot of the code for animations and what not, with comments and I still get the list jumping back to the top.

Anyone experience this?

I might have stumbled upon a fix for that problem. I had a problem where fastScroll would bug out when some of the elements where set to hidden and it would scroll a bit and then jump back to top.

But after adding FooterView (empty one with paddingBottom: 16dp) to ListView would remove that jumping bug. Hopefully it helps you to fix it.

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