From 50fa85882e30ceaae38a65aee8f404db854abdf4 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sat, 14 Sep 2024 11:21:15 +0200 Subject: [PATCH] Remove animated playback speed button (#7401) The button is behind the dialog anyway, so nobody can see the animation --- .../playback/audio/AudioPlayerFragment.java | 6 +- .../main/res/layout/audioplayer_fragment.xml | 6 +- .../ui/common/PlaybackSpeedIndicatorView.java | 113 ------------------ 3 files changed, 6 insertions(+), 119 deletions(-) delete mode 100644 ui/common/src/main/java/de/danoeh/antennapod/ui/common/PlaybackSpeedIndicatorView.java diff --git a/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/AudioPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/AudioPlayerFragment.java index e0f060540..36df4bcf3 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/AudioPlayerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/screen/playback/audio/AudioPlayerFragment.java @@ -63,7 +63,6 @@ import de.danoeh.antennapod.model.feed.FeedMedia; import de.danoeh.antennapod.model.playback.Playable; import de.danoeh.antennapod.playback.cast.CastEnabledActivity; import de.danoeh.antennapod.storage.preferences.UserPreferences; -import de.danoeh.antennapod.ui.common.PlaybackSpeedIndicatorView; import io.reactivex.Maybe; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; @@ -79,8 +78,8 @@ public class AudioPlayerFragment extends Fragment implements public static final int POS_DESCRIPTION = 1; private static final int NUM_CONTENT_FRAGMENTS = 2; - PlaybackSpeedIndicatorView butPlaybackSpeed; - TextView txtvPlaybackSpeed; + private ImageButton butPlaybackSpeed; + private TextView txtvPlaybackSpeed; private ViewPager2 pager; private TextView txtvPosition; private TextView txtvLength; @@ -245,7 +244,6 @@ public class AudioPlayerFragment extends Fragment implements public void updatePlaybackSpeedButton(SpeedChangedEvent event) { String speedStr = new DecimalFormat("0.00").format(event.getNewSpeed()); txtvPlaybackSpeed.setText(speedStr); - butPlaybackSpeed.setSpeed(event.getNewSpeed()); } private void loadMediaInfo(boolean includingChapters) { diff --git a/app/src/main/res/layout/audioplayer_fragment.xml b/app/src/main/res/layout/audioplayer_fragment.xml index 3c52daa94..123fc39cd 100644 --- a/app/src/main/res/layout/audioplayer_fragment.xml +++ b/app/src/main/res/layout/audioplayer_fragment.xml @@ -205,17 +205,19 @@ android:textColor="?android:attr/textColorSecondary" android:textSize="12sp" /> - + app:srcCompat="@drawable/ic_playback_speed" /> 0.5 && targetAngle != VALUE_UNSET) { - angle += Math.signum(targetAngle - angle) * Math.min(degreePerFrame, Math.abs(targetAngle - angle)); - invalidate(); - } - } -}