mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Merge pull request #4544 from Bnyro/master
fix: remove useless buttons to reset pitch and playback speed
This commit is contained in:
commit
b45793877a
@ -10,7 +10,6 @@ import androidx.recyclerview.widget.GridLayoutManager
|
|||||||
import com.github.libretube.constants.PreferenceKeys
|
import com.github.libretube.constants.PreferenceKeys
|
||||||
import com.github.libretube.databinding.PlaybackBottomSheetBinding
|
import com.github.libretube.databinding.PlaybackBottomSheetBinding
|
||||||
import com.github.libretube.extensions.round
|
import com.github.libretube.extensions.round
|
||||||
import com.github.libretube.helpers.PlayerHelper
|
|
||||||
import com.github.libretube.helpers.PreferenceHelper
|
import com.github.libretube.helpers.PreferenceHelper
|
||||||
import com.github.libretube.ui.adapters.SliderLabelsAdapter
|
import com.github.libretube.ui.adapters.SliderLabelsAdapter
|
||||||
|
|
||||||
@ -55,15 +54,6 @@ class PlaybackOptionsSheet(
|
|||||||
onChange()
|
onChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.resetSpeed.setOnClickListener {
|
|
||||||
binding.speed.value = PlayerHelper.playbackSpeed
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.resetPitch.setOnClickListener {
|
|
||||||
binding.pitch.value = 1f
|
|
||||||
onChange()
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.skipSilence.setOnCheckedChangeListener { _, isChecked ->
|
binding.skipSilence.setOnCheckedChangeListener { _, isChecked ->
|
||||||
player.skipSilenceEnabled = isChecked
|
player.skipSilenceEnabled = isChecked
|
||||||
PreferenceHelper.putBoolean(PreferenceKeys.SKIP_SILENCE, isChecked)
|
PreferenceHelper.putBoolean(PreferenceKeys.SKIP_SILENCE, isChecked)
|
||||||
|
@ -41,32 +41,15 @@
|
|||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="horizontal" />
|
android:orientation="horizontal" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.google.android.material.slider.Slider
|
<com.google.android.material.slider.Slider
|
||||||
android:id="@+id/speed"
|
android:id="@+id/speed"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:stepSize="0.1"
|
android:stepSize="0.1"
|
||||||
android:value="1.0"
|
android:value="1.0"
|
||||||
android:valueFrom="0.2"
|
android:valueFrom="0.2"
|
||||||
android:valueTo="4.0" />
|
android:valueTo="4.0" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/reset_speed"
|
|
||||||
android:tooltipText="@string/reset"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
|
||||||
android:src="@drawable/ic_history" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -79,33 +62,15 @@
|
|||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="horizontal" />
|
android:orientation="horizontal" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<com.google.android.material.slider.Slider
|
<com.google.android.material.slider.Slider
|
||||||
android:id="@+id/pitch"
|
android:id="@+id/pitch"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:stepSize="0.1"
|
android:stepSize="0.1"
|
||||||
android:value="1.0"
|
android:value="1.0"
|
||||||
android:valueFrom="0.5"
|
android:valueFrom="0.5"
|
||||||
android:valueTo="2.0" />
|
android:valueTo="2.0" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/reset_pitch"
|
|
||||||
android:tooltipText="@string/reset"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
|
||||||
android:src="@drawable/ic_history" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.checkbox.MaterialCheckBox
|
<com.google.android.material.checkbox.MaterialCheckBox
|
||||||
|
Loading…
Reference in New Issue
Block a user