From b271103cc906f3689c7016ac8be5b7bfdf014cd1 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 19 Aug 2023 10:31:08 +0200 Subject: [PATCH] fix: remove useless buttons to reset pitch and playback speed --- .../ui/sheets/PlaybackOptionsSheet.kt | 10 --- .../main/res/layout/playback_bottom_sheet.xml | 61 ++++--------------- 2 files changed, 13 insertions(+), 58 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt b/app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt index 0e4875f51..e6dc59ff3 100644 --- a/app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt +++ b/app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt @@ -10,7 +10,6 @@ import androidx.recyclerview.widget.GridLayoutManager import com.github.libretube.constants.PreferenceKeys import com.github.libretube.databinding.PlaybackBottomSheetBinding import com.github.libretube.extensions.round -import com.github.libretube.helpers.PlayerHelper import com.github.libretube.helpers.PreferenceHelper import com.github.libretube.ui.adapters.SliderLabelsAdapter @@ -55,15 +54,6 @@ class PlaybackOptionsSheet( onChange() } - binding.resetSpeed.setOnClickListener { - binding.speed.value = PlayerHelper.playbackSpeed - } - - binding.resetPitch.setOnClickListener { - binding.pitch.value = 1f - onChange() - } - binding.skipSilence.setOnCheckedChangeListener { _, isChecked -> player.skipSilenceEnabled = isChecked PreferenceHelper.putBoolean(PreferenceKeys.SKIP_SILENCE, isChecked) diff --git a/app/src/main/res/layout/playback_bottom_sheet.xml b/app/src/main/res/layout/playback_bottom_sheet.xml index 063ba4e2d..76b7daf71 100644 --- a/app/src/main/res/layout/playback_bottom_sheet.xml +++ b/app/src/main/res/layout/playback_bottom_sheet.xml @@ -41,31 +41,14 @@ android:layout_marginTop="10dp" android:orientation="horizontal" /> - - - - - - - + android:layout_height="wrap_content" + android:stepSize="0.1" + android:value="1.0" + android:valueFrom="0.2" + android:valueTo="4.0" /> - - - - - - - + android:stepSize="0.1" + android:value="1.0" + android:valueFrom="0.5" + android:valueTo="2.0" />