From ba53fbb07824f7d1d9c58f3f714e970b40acf422 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Thu, 3 Mar 2016 20:22:46 +0100 Subject: [PATCH] Preference playback speed string has to be in US locale --- .../danoeh/antennapod/activity/MediaplayerActivity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index 00b0a5724..ce26adf05 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -31,6 +31,8 @@ import com.bumptech.glide.Glide; import com.joanzapata.iconify.IconDrawable; import com.joanzapata.iconify.fonts.FontAwesomeIcons; +import java.util.Locale; + import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedMedia; @@ -458,9 +460,10 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O if(controller != null && controller.canSetPlaybackSpeed()) { float playbackSpeed = (progress + 10) / 20.0f; controller.setPlaybackSpeed(playbackSpeed); - String speed = String.format("%.2f", playbackSpeed); - UserPreferences.setPlaybackSpeed(speed); - txtvPlaybackSpeed.setText(speed + "x"); + String speedPref = String.format(Locale.US, "%.2f", playbackSpeed); + UserPreferences.setPlaybackSpeed(speedPref); + String speedStr = String.format("%.2fx", playbackSpeed); + txtvPlaybackSpeed.setText(speedStr); } else if(fromUser) { float speed = Float.valueOf(UserPreferences.getPlaybackSpeed()); barPlaybackSpeed.post(() -> {