Skip to content

Commit 3aab752

Browse files
author
Issac
committed
Set max velocity of swipe animation, ensure smooth scroll.
1 parent 94f59c2 commit 3aab752

File tree

4 files changed

+141
-125
lines changed

4 files changed

+141
-125
lines changed

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
apply plugin: 'android-library'
1+
apply plugin: 'com.android.library'
22

33
repositories {
44
mavenCentral()
55
}
66

77
dependencies {
8-
compile 'com.android.support:support-v4:+'
8+
compile 'com.android.support:support-v4:19.0.+'
99
}
1010

1111
android {

library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public SwipeBackLayout(Context context, AttributeSet attrs, int defStyle) {
156156
final float density = getResources().getDisplayMetrics().density;
157157
final float minVel = MIN_FLING_VELOCITY * density;
158158
mDragHelper.setMinVelocity(minVel);
159+
mDragHelper.setMaxVelocity(minVel * 2f);
159160
}
160161

161162
/**

0 commit comments

Comments
 (0)