Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:)

like image 679
glodos Avatar asked Aug 04 '11 12:08

glodos


1 Answers

using listview and try scrollToPosition(),or smoothscrollBy()

like image 95
zyunchen Avatar answered Oct 19 '22 12:10

zyunchen