diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-09-05 01:24:49 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-09-05 19:38:09 +0200 |
commit | 1fe0e96ed03b4306b583b8128970dccc860a0d9b (patch) | |
tree | 64fffdbee9a87e8b6cd9043da3be5133e5823945 /app/src/main | |
parent | 1dd87efebd6e987b8e3c07abc56a01e9bf0883bd (diff) | |
download | AntennaPod-1fe0e96ed03b4306b583b8128970dccc860a0d9b.zip |
Set max slider playback speed to 2.50 or current speed if it is higher than that
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java | 6 |
1 files changed, 4 insertions, 2 deletions
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 4a94caefe..c3d82c41d 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/AudioplayerActivity.java @@ -503,8 +503,10 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc SeekBar sbSelectSpeed = (SeekBar) popupView.findViewById(R.id.sbSelectSpeed); txtvSelectedSpeed.setText(currentSpeed); - sbSelectSpeed.setMax(availableSpeeds.length - 1); - sbSelectSpeed.setProgress(ArrayUtils.indexOf(availableSpeeds, currentSpeed)); + int progress = ArrayUtils.indexOf(availableSpeeds, currentSpeed); + int max = Math.max(progress, ArrayUtils.indexOf(availableSpeeds, "2.50")); + sbSelectSpeed.setMax(max); + sbSelectSpeed.setProgress(progress); sbSelectSpeed.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { |