Skip to content

Commit 3724c54

Browse files
author
Jens Claes
committed
Add duration for scroll snapping
1 parent a9bc39d commit 3724c54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/alamkanak/weekview/WeekView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ private void goToNearestOrigin(){
14841484
// stop current animation
14851485
mScroller.forceFinished(true);
14861486
// snap to date
1487-
mScroller.startScroll((int) mCurrentOrigin.x, (int) mCurrentOrigin.y, -nearestOrigin, 0);
1487+
mScroller.startScroll((int) mCurrentOrigin.x, (int) mCurrentOrigin.y, -nearestOrigin, 0, 50);
14881488
ViewCompat.postInvalidateOnAnimation(WeekView.this);
14891489
}
14901490
// reset scrolling and fling direction

0 commit comments

Comments
 (0)