summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hennen <tom.hennen@gmail.com>2016-03-03 19:38:50 -0500
committerTom Hennen <tom.hennen@gmail.com>2016-03-03 19:38:50 -0500
commit0dc57a373bca3a60dccc0321c8352d4fd31c031c (patch)
tree7342abde176725082371269e0f6e3510685f8f71
parenta7ef24606962385a5b20d1c6df2dec623cc3aa69 (diff)
parent651688f3ad94347dfb6d35a6dbe2e686540cb60b (diff)
downloadAntennaPod-0dc57a373bca3a60dccc0321c8352d4fd31c031c.zip
Merge branch 'develop' of github.com:AntennaPod/AntennaPod into develop
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java16
-rw-r--r--build.gradle2
2 files changed, 13 insertions, 5 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 0d878b556..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;
@@ -247,6 +249,9 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
controller.release();
}
controller = newPlaybackController();
+ if(butPlay != null) {
+ butPlay.setOnClickListener(controller.newOnPlayButtonClickListener());
+ }
}
@Override
@@ -455,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(() -> {
@@ -876,7 +882,9 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
private void updateButPlaybackSpeed() {
if (controller != null && butPlaybackSpeed != null) {
- butPlaybackSpeed.setText(UserPreferences.getPlaybackSpeed() + "x");
+ float speed = Float.valueOf(UserPreferences.getPlaybackSpeed());
+ String speedStr = String.format("%.2fx", speed);
+ butPlaybackSpeed.setText(speedStr);
}
}
diff --git a/build.gradle b/build.gradle
index 53ea77e5d..a3c0187ff 100644
--- a/build.gradle
+++ b/build.gradle
@@ -57,7 +57,7 @@ project.ext {
rxJavaVersion = "1.1.0"
rxJavaRulesVersion = "1.1.0.0"
- audioPlayerVersion = "v1.0.12"
+ audioPlayerVersion = "v1.0.14"
}
task wrapper(type: Wrapper) {