简体   繁体   中英

Scroll ListView smoothly and programmatically

I have searched a lot but I couldn't find an answer.

I want to implement something like in Go Launcher. When you drag an icon in app drawer and move it out of container top or bottom bound, the list begins to scroll. So far, I have tried following things:

  1. Dispatch touch events to simulate scrolling - impossible while touching the screen

  2. Use smoothScrollBy() method - almost there, but it scrolls only screen height distance

  3. Use scrollBy() - it moves only the container and leaves blank space. I would put there some rows if only I could be able to reuse views that went off the screen.

I need the ListView to scroll SMOOTHLY.

So here goes ma question. Anybody knows how can it be done? I'll put a gratitude in About section of my app to person who will help me:)

使用listview并尝试scrollToPosition()或smoothscrollBy()

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