How to implement Android Pull-to-Refresh
Posted
by
yuku
on Stack Overflow
See other posts from Stack Overflow
or by yuku
Published on 2011-01-03T09:51:23Z
Indexed on
2011/01/03
9:53 UTC
Read the original article
Hit count: 339
In Android applications such as Twitter (official app), when you encounter a ListView, you can pull it down (and it will bounce back when released) to refresh the content.
I wonder what is the best way, in your opinion, to implement that?
Some possibilities I could think of:
- An item on top of the ListView - however I don't think scrolling back to item position 1 (0-based) with animation on the ListView is an easy task.
- Another view outside the ListView - but I need to take care of moving the ListView position down when it is pulled, and I'm not sure if we can detect if the drag-touches to the ListView still really scroll the items on the ListView.
Any recommendations?
© Stack Overflow or respective owner