@@ -262,19 +262,26 @@ public void performSwipe(Point point, final Animator.AnimatorListener listener)
262
262
}
263
263
264
264
public void performSwipe (SwipeDirection direction , AnimatorSet set , AnimatorSet overlayAnimatorSet , final Animator .AnimatorListener listener ) {
265
- if (direction == SwipeDirection .Left ) {
265
+ boolean showOverlay ;
266
+ if (showOverlay = direction == SwipeDirection .Left ) {
266
267
getTopView ().showLeftOverlay ();
267
- getTopView ().setOverlayAlpha (overlayAnimatorSet );
268
- } else if (direction == SwipeDirection .Right ) {
268
+ } else if (showOverlay = direction == SwipeDirection .Right ) {
269
269
getTopView ().showRightOverlay ();
270
- getTopView ().setOverlayAlpha (overlayAnimatorSet );
271
- } else if (direction == SwipeDirection .Bottom ){
270
+ } else if (showOverlay = direction == SwipeDirection .Bottom ){
272
271
getTopView ().showBottomOverlay ();
273
- getTopView ().setOverlayAlpha (overlayAnimatorSet );
274
- } else if (direction == SwipeDirection .Top ){
272
+ } else if (showOverlay = direction == SwipeDirection .Top ){
275
273
getTopView ().showTopOverlay ();
276
- getTopView ().setOverlayAlpha (overlayAnimatorSet );
274
+ } else {
275
+ showOverlay = false ;
277
276
}
277
+ if (showOverlay ) {
278
+ if (overlayAnimatorSet != null ) {
279
+ getTopView ().setOverlayAlpha (overlayAnimatorSet );
280
+ } else {
281
+ getTopView ().setOverlayAlpha (1f );
282
+ }
283
+ }
284
+
278
285
set .addListener (listener );
279
286
set .setInterpolator (new TimeInterpolator () {
280
287
@ Override
0 commit comments