Fix popup closing x button animation

This commit is contained in:
Stypox 2021-01-19 09:33:47 +01:00
parent 9a65f02d5b
commit e327f7ba2c
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
2 changed files with 6 additions and 9 deletions

View File

@ -4003,7 +4003,7 @@ public final class Player implements
} }
public View getClosingOverlayView() { public View getClosingOverlayView() {
return closeOverlayBinding.getRoot(); return binding.closingOverlay;
} }
public ProgressBar getVolumeProgressBar() { public ProgressBar getVolumeProgressBar() {

View File

@ -124,11 +124,11 @@ public class PlayerGestureListener
final View closingOverlayView = player.getClosingOverlayView(); final View closingOverlayView = player.getClosingOverlayView();
if (player.isInsideClosingRadius(movingEvent)) { if (player.isInsideClosingRadius(movingEvent)) {
if (closingOverlayView.getVisibility() == View.GONE) { if (closingOverlayView.getVisibility() == View.GONE) {
animate(closingOverlayView, true, 250); animate(closingOverlayView, true, 200);
} }
} else { } else {
if (closingOverlayView.getVisibility() == View.VISIBLE) { if (closingOverlayView.getVisibility() == View.VISIBLE) {
animate(closingOverlayView, false, 0); animate(closingOverlayView, false, 200);
} }
} }
} }
@ -234,12 +234,9 @@ public class PlayerGestureListener
if (player.isInsideClosingRadius(event)) { if (player.isInsideClosingRadius(event)) {
player.closePopup(); player.closePopup();
} else { } else if (!player.isPopupClosing()) {
animate(player.getClosingOverlayView(), false, 0); animate(player.getCloseOverlayButton(), false, 200);
animate(player.getClosingOverlayView(), false, 200);
if (!player.isPopupClosing()) {
animate(player.getCloseOverlayButton(), false, 200);
}
} }
} }
} }