summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2020-02-21 22:48:57 +0100
committerGitHub <noreply@github.com>2020-02-21 22:48:57 +0100
commit930642cb36b262196ac4f56a1e8e9e582cd42ec8 (patch)
tree069a996206bc284f615610dcbf3897b0765f5285 /app/src/main
parent78effc90a6f1a5e15f669cd90983c5f438a496b2 (diff)
parentf613fa11dc335b2f3ceb787575c13973933b4b82 (diff)
downloadAntennaPod-930642cb36b262196ac4f56a1e8e9e582cd42ec8.zip
Merge pull request #3879 from ByteHamster/playback-controls
Fixed overlapping audio controls
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java4
-rw-r--r--app/src/main/res/layout/audio_controls.xml235
2 files changed, 115 insertions, 124 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 4e3068e7b..95d6dfd9e 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java
@@ -139,7 +139,7 @@ public class PlaybackControlsDialog extends DialogFragment {
if (controller != null && !controller.canDownmix()) {
stereoToMono.setEnabled(false);
String sonicOnly = getString(R.string.sonic_only);
- stereoToMono.setText(stereoToMono.getText() + " [" + sonicOnly + "]");
+ stereoToMono.setText(getString(R.string.stereo_to_mono) + " [" + sonicOnly + "]");
}
if (UserPreferences.useExoplayer()) {
@@ -151,7 +151,7 @@ public class PlaybackControlsDialog extends DialogFragment {
if (!UserPreferences.useExoplayer()) {
skipSilence.setEnabled(false);
String exoplayerOnly = getString(R.string.exoplayer_only);
- skipSilence.setText(skipSilence.getText() + " [" + exoplayerOnly + "]");
+ skipSilence.setText(getString(R.string.pref_skip_silence_title) + " [" + exoplayerOnly + "]");
}
skipSilence.setOnCheckedChangeListener((buttonView, isChecked) -> {
UserPreferences.setSkipSilence(isChecked);
diff --git a/app/src/main/res/layout/audio_controls.xml b/app/src/main/res/layout/audio_controls.xml
index 25e914c55..cb2c72143 100644
--- a/app/src/main/res/layout/audio_controls.xml
+++ b/app/src/main/res/layout/audio_controls.xml
@@ -1,151 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minWidth="300dp"
+ android:orientation="vertical">
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
- android:text="@string/playback_speed"
- android:textStyle="bold"/>
+ android:orientation="horizontal">
- <TextView
- android:id="@+id/txtvPlaybackSpeed"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginStart="16dp"
- android:text="1.00x"/>
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
+ android:layout_weight="1"
+ android:text="@string/playback_speed" />
- </LinearLayout>
+ <TextView
+ android:id="@+id/txtvPlaybackSpeed"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="1.00x" />
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="-12dp">
-
- <Button
- android:id="@+id/butDecSpeed"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:gravity="center"
- android:text="-"
- android:textStyle="bold"
- android:textColor="@color/status_progress"
- android:textSize="24sp"
- android:background="?android:attr/selectableItemBackground"/>
-
- <Button
- android:id="@+id/butIncSpeed"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:minWidth="0dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentEnd="true"
- android:gravity="center"
- android:text="+"
- android:textStyle="bold"
- android:textColor="@color/status_progress"
- android:textSize="24sp"
- android:background="?android:attr/selectableItemBackground"/>
-
- <SeekBar
- android:id="@+id/playback_speed"
- android:layout_width="match_parent"
- android:layout_height="32dp"
- android:layout_toRightOf="@id/butDecSpeed"
- android:layout_toEndOf="@id/butDecSpeed"
- android:layout_toLeftOf="@id/butIncSpeed"
- android:layout_toStartOf="@id/butIncSpeed"
- android:layout_centerVertical="true"
- android:max="40"/>
-
- </RelativeLayout>
-
- <CheckBox
- android:id="@+id/skipSilence"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:text="@string/pref_skip_silence_title" />
+ </LinearLayout>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
- android:text="@string/volume"
- android:textStyle="bold"/>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="-12dp"
- android:layout_marginLeft="8dp"
- android:layout_marginStart="8dp"
- android:orientation="horizontal"
- android:gravity="center">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <Button
+ android:id="@+id/butDecSpeed"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ android:gravity="center"
+ android:text="-"
+ android:textStyle="bold"
+ android:textColor="@color/status_progress"
+ android:textSize="24sp"
+ android:background="?attr/selectableItemBackgroundBorderless" />
+
+ <SeekBar
+ android:id="@+id/playback_speed"
+ android:layout_width="0dp"
+ android:layout_height="32dp"
+ android:max="70"
+ android:layout_weight="1" />
+
+ <Button
+ android:id="@+id/butIncSpeed"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ android:minWidth="0dp"
+ android:gravity="center"
+ android:text="+"
+ android:textStyle="bold"
+ android:textColor="@color/status_progress"
+ android:textSize="24sp"
+ android:background="?attr/selectableItemBackgroundBorderless" />
+ </LinearLayout>
<TextView
- android:id="@+id/txtvLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/left_short" />
+ android:layout_marginTop="12dp"
+ android:layout_marginBottom="4dp"
+ style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
+ android:text="@string/volume" />
- <SeekBar
- android:id="@+id/volume_left"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:max="100" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:layout_marginLeft="8dp"
- android:layout_marginStart="8dp"
- android:orientation="horizontal"
- android:gravity="center">
+ android:layout_marginLeft="8dp"
+ android:layout_marginStart="8dp"
+ android:orientation="horizontal"
+ android:gravity="center">
+
+ <TextView
+ android:id="@+id/txtvLeft"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/left_short" />
+
+ <SeekBar
+ android:id="@+id/volume_left"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:max="100" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_marginLeft="8dp"
+ android:layout_marginStart="8dp"
+ android:orientation="horizontal"
+ android:gravity="center">
+
+ <TextView
+ android:id="@+id/txtvRight"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/right_short" />
+
+ <SeekBar
+ android:id="@+id/volume_right"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:max="100" />
+
+ </LinearLayout>
<TextView
- android:id="@+id/txtvRight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/right_short" />
+ android:layout_marginTop="20dp"
+ style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
+ android:text="@string/audio_effects" />
- <SeekBar
- android:id="@+id/volume_right"
+ <CheckBox
+ android:id="@+id/skipSilence"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:max="100"/>
+ android:text="@string/pref_skip_silence_title" />
+ <CheckBox
+ android:id="@+id/stereo_to_mono"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/stereo_to_mono" />
</LinearLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="12dp"
- style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
- android:text="@string/audio_effects"
- android:textStyle="bold"/>
-
- <CheckBox
- android:id="@+id/stereo_to_mono"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="-12dp"
- android:text="@string/stereo_to_mono" />
-
-</LinearLayout>
+</ScrollView>