From 1dd87efebd6e987b8e3c07abc56a01e9bf0883bd Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 4 Sep 2015 21:16:35 +0200 Subject: [PATCH] Scale animation when playback speed has been changed via popup --- .../danoeh/antennapod/activity/AudioplayerActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java index 480f8a5f8..4a94caefe 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java @@ -22,6 +22,8 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import android.view.animation.LinearInterpolator; +import android.view.animation.ScaleAnimation; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; @@ -521,6 +523,13 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc if (popupWindow != null && popupWindow.isShowing()) { popupWindow.dismiss(); } + ScaleAnimation anim = new ScaleAnimation(1.0f, 1.33f, 1.0f, 1.33f, + butPlaybackSpeed.getWidth()/2, butPlaybackSpeed.getHeight()/2); + anim.setDuration(150); + anim.setRepeatMode(ScaleAnimation.REVERSE); + anim.setRepeatCount(1); + anim.setInterpolator(new LinearInterpolator()); + butPlaybackSpeed.startAnimation(anim); } }); popupWindow = new PopupWindow(popupView,