开发者

Android: Control ListView Scroll Animation Interval?

开发者 https://www.devze.com 2023-01-21 15:04 出处:网络
Is it possible to set up a ListView so when it scrolls it only scrolls 开发者_StackOverflow社区in intervals related to the height of the List Item. In other words if my item height is a number h and a

Is it possible to set up a ListView so when it scrolls it only scrolls 开发者_StackOverflow社区in intervals related to the height of the List Item. In other words if my item height is a number h and a swipe of the list is given a number p to represent how hard the swipe is so it can go further if the swipe is harder is it possible to set the ListView so that it always scrolls a distance d related to the the height and swipe strength. i.e. d = h x p

I figure I could do this myself by building a list from scratch using a linear layout and catching the swipe event, but it'd be a whole lot easier if the ListView can already do something like this.

The reason I want this is so that if I have, let's say, 10 items in a list and 5 are visible I want the 5 visible to always be in the same relative position so that they line up with an element that is laid over the list.

0

精彩评论

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