我有一种情况,我使用与图像的水平滚动视图并使用按钮来平滑滚动到不同的图像位置。现在,它的工作原理好吧,我只是想知道是否有人知道反正减缓平滑滚动的方法,即具有较长annimation时间?作为目前捕捉迅速发生pretty的。
I have a situation in that I am using a horizontal scroll view with images and using buttons to smooth scroll to the different image locations. Now it works okay I was just wondering if anyone knew of anyway to slow down the smooth scroll method, i.e. having a longer annimation time? As currently the snapping happens pretty quickly.
也许通过smoothscroll的重写,我试图寻找这/例子,但没有运气。
Perhaps through an override of the smoothscroll, I have tried to search for this/examples but to no luck.
因此,任何想法?
谢谢
硅
怎么样:
ObjectAnimator animator=ObjectAnimator.ofInt(yourHorizontalScrollView, "scrollX",targetXScroll );
animator.setDuration(800);
animator.start();
上一篇:的对等通信选项对等、选项、通信
下一篇:安卓:问题NewView的和bindView定制SimpleCursorAdapter问题、NewView、SimpleCursorAdapter、bindView