开发者

Refresh Android listview after scrollBy on

This is my first post on stackoverflow. I use this one some times when I have a problem and find a solution every time. But today is different. Have a non-solved problem :

I have on listview and I want apply a magnetic effect on this. To make this, I use scrollBy one by one pixel with Thread to move listview position. Visually, it's perfect, listview move good. But when user want scroll again, listview come back to his previous position (just before scrollBy) before scroll normally with user finger.

I've tried some tests, for exemple I display v.getTop() (v is on view item in listview) value BEFORE my scrollBy and AFTER. Values are same, but visually are really different because list are moved. Also visually, you can see a little artefact : this divider is ON listview item. It's means that visually, listview is good, but programatically isn't good... while scrollBy make invalidate estate.

Anyone have an idea or a solution ?

Thnak you for your help.

PS : Sorry for my engl开发者_如何学Goish, i'm french. Thank you again.


Use getScrollY() to find the current position and then set that position after it gets reset.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜