summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilverwarriorin <46795935+Silverwarriorin@users.noreply.github.com>2022-02-18 16:13:10 -0500
committerGitHub <noreply@github.com>2022-02-18 22:13:10 +0100
commit9ff295619f7423aeabc1d23464e347fc71af0d4d (patch)
treeb81435f6254e86ae178e981559a0f7d74962c380
parent924543b0202c39013a6cea9b59255176d83c9ec2 (diff)
downloadantennapod-9ff295619f7423aeabc1d23464e347fc71af0d4d.zip
Removed the speed indicator from the PlaybackControlsDialog (#5702)
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java28
-rw-r--r--app/src/main/res/layout/audio_controls.xml25
2 files changed, 0 insertions, 53 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java
index 5cc1f99c6..841c121e9 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java
@@ -10,24 +10,14 @@ import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import android.widget.Button;
import android.widget.CheckBox;
-import android.widget.TextView;
import de.danoeh.antennapod.R;
-import de.danoeh.antennapod.event.playback.SpeedChangedEvent;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.util.playback.PlaybackController;
-import de.danoeh.antennapod.view.PlaybackSpeedSeekBar;
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-import org.greenrobot.eventbus.ThreadMode;
-
import java.util.List;
-import java.util.Locale;
public class PlaybackControlsDialog extends DialogFragment {
private PlaybackController controller;
private AlertDialog dialog;
- private PlaybackSpeedSeekBar speedSeekBar;
- private TextView txtvPlaybackSpeed;
public static PlaybackControlsDialog newInstance() {
Bundle arguments = new Bundle();
@@ -48,12 +38,10 @@ public class PlaybackControlsDialog extends DialogFragment {
public void loadMediaInfo() {
setupUi();
setupAudioTracks();
- updateSpeed(new SpeedChangedEvent(getCurrentPlaybackSpeedMultiplier()));
}
};
controller.init();
setupUi();
- EventBus.getDefault().register(this);
}
@Override
@@ -61,7 +49,6 @@ public class PlaybackControlsDialog extends DialogFragment {
super.onStop();
controller.release();
controller = null;
- EventBus.getDefault().unregister(this);
}
@NonNull
@@ -75,15 +62,6 @@ public class PlaybackControlsDialog extends DialogFragment {
}
private void setupUi() {
- txtvPlaybackSpeed = dialog.findViewById(R.id.txtvPlaybackSpeed);
- speedSeekBar = dialog.findViewById(R.id.speed_seek_bar);
- speedSeekBar.setProgressChangedListener(speed -> {
- if (controller != null) {
- controller.setPlaybackSpeed(speed);
- }
- });
- updateSpeed(new SpeedChangedEvent(controller.getCurrentPlaybackSpeedMultiplier()));
-
final CheckBox stereoToMono = dialog.findViewById(R.id.stereo_to_mono);
stereoToMono.setChecked(UserPreferences.stereoToMono());
if (controller != null && !controller.canDownmix()) {
@@ -111,12 +89,6 @@ public class PlaybackControlsDialog extends DialogFragment {
});
}
- @Subscribe(threadMode = ThreadMode.MAIN)
- public void updateSpeed(SpeedChangedEvent event) {
- txtvPlaybackSpeed.setText(String.format(Locale.getDefault(), "%.2fx", event.getNewSpeed()));
- speedSeekBar.updateSpeed(event.getNewSpeed());
- }
-
private void setupAudioTracks() {
List<String> audioTracks = controller.getAudioTracks();
int selectedAudioTrack = controller.getSelectedAudioTrack();
diff --git a/app/src/main/res/layout/audio_controls.xml b/app/src/main/res/layout/audio_controls.xml
index 0bfa4f521..dc48006bb 100644
--- a/app/src/main/res/layout/audio_controls.xml
+++ b/app/src/main/res/layout/audio_controls.xml
@@ -19,31 +19,6 @@
android:visibility="gone"
android:layout_marginBottom="8dp" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <TextView
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/playback_speed"
- style="@style/AntennaPod.TextView.ListItemPrimaryTitle" />
-
- <TextView
- android:id="@+id/txtvPlaybackSpeed"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="1.00x" />
-
- </LinearLayout>
-
- <de.danoeh.antennapod.view.PlaybackSpeedSeekBar
- android:id="@+id/speed_seek_bar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"