diff options
author | ByteHamster <info@bytehamster.com> | 2020-02-21 21:16:32 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-02-21 22:34:58 +0100 |
commit | f613fa11dc335b2f3ceb787575c13973933b4b82 (patch) | |
tree | bd33c54ed024bb7af15b975752c95b835a3c45e5 /app | |
parent | 5f0aba7a3c78e23d5d6ba9e38bceca16a83b85ba (diff) | |
download | AntennaPod-f613fa11dc335b2f3ceb787575c13973933b4b82.zip |
Fixed overlapping audio controls
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/PlaybackControlsDialog.java | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/audio_controls.xml | 235 |
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 ef81cf9e2..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="70"/> - - </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> |