@@ -261,19 +261,19 @@ public void performSwipe(Point point, final Animator.AnimatorListener listener)
261
261
.start ();
262
262
}
263
263
264
- public void performSwipe (SwipeDirection direction , AnimatorSet set , final Animator .AnimatorListener listener ) {
264
+ public void performSwipe (SwipeDirection direction , AnimatorSet set , AnimatorSet overlayAnimatorSet , final Animator .AnimatorListener listener ) {
265
265
if (direction == SwipeDirection .Left ) {
266
266
getTopView ().showLeftOverlay ();
267
- getTopView ().setOverlayAlpha (1f );
267
+ getTopView ().setOverlayAlpha (overlayAnimatorSet );
268
268
} else if (direction == SwipeDirection .Right ) {
269
269
getTopView ().showRightOverlay ();
270
- getTopView ().setOverlayAlpha (1f );
270
+ getTopView ().setOverlayAlpha (overlayAnimatorSet );
271
271
} else if (direction == SwipeDirection .Bottom ){
272
272
getTopView ().showBottomOverlay ();
273
- getTopView ().setOverlayAlpha (1f );
273
+ getTopView ().setOverlayAlpha (overlayAnimatorSet );
274
274
} else if (direction == SwipeDirection .Top ){
275
275
getTopView ().showTopOverlay ();
276
- getTopView ().setOverlayAlpha (1f );
276
+ getTopView ().setOverlayAlpha (overlayAnimatorSet );
277
277
}
278
278
set .addListener (listener );
279
279
set .setInterpolator (new TimeInterpolator () {
@@ -476,8 +476,12 @@ public void onAnimationEnd(Animator animator) {
476
476
}
477
477
478
478
public void swipe (final SwipeDirection direction , AnimatorSet set ) {
479
+ swipe (direction , set , null );
480
+ }
481
+
482
+ public void swipe (final SwipeDirection direction , AnimatorSet cardAnimatorSet , AnimatorSet overlayAnimatorSet ) {
479
483
executePreSwipeTask ();
480
- performSwipe (direction , set , new AnimatorListenerAdapter () {
484
+ performSwipe (direction , cardAnimatorSet , overlayAnimatorSet , new AnimatorListenerAdapter () {
481
485
@ Override
482
486
public void onAnimationEnd (Animator animator ) {
483
487
executePostSwipeTask (new Point (0 , -2000 ), direction );
0 commit comments