Merge pull request #7363 from litetex/playback-speed-ctrls-simple-landscape-improvements

Simple playback-speed-controls improvements
This commit is contained in:
Robin 2021-11-12 21:19:17 +01:00 committed by GitHub
commit 344fbff59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 33 deletions

View File

@ -1,5 +1,8 @@
package org.schabi.newpipe.player.helper;
import static org.schabi.newpipe.player.Player.DEBUG;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
@ -18,9 +21,6 @@ import androidx.preference.PreferenceManager;
import org.schabi.newpipe.R;
import org.schabi.newpipe.util.SliderStrategy;
import static org.schabi.newpipe.player.Player.DEBUG;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class PlaybackParameterDialog extends DialogFragment {
// Minimum allowable range in ExoPlayer
private static final double MINIMUM_PLAYBACK_VALUE = 0.10f;
@ -157,7 +157,6 @@ public class PlaybackParameterDialog extends DialogFragment {
setupControlViews(view);
final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(requireActivity())
.setTitle(R.string.playback_speed_control)
.setView(view)
.setCancelable(true)
.setNegativeButton(R.string.cancel, (dialogInterface, i) ->

View File

@ -4,9 +4,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="false"
android:paddingLeft="@dimen/video_item_search_padding"
android:paddingTop="@dimen/video_item_search_padding"
android:paddingRight="@dimen/video_item_search_padding">
android:paddingStart="6dp"
android:paddingTop="4dp"
android:paddingEnd="6dp">
<RelativeLayout
android:layout_width="match_parent"
@ -31,7 +31,7 @@
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@id/tempoControlText"
android:layout_marginTop="4dp"
android:layout_marginTop="3dp"
android:orientation="horizontal">
<org.schabi.newpipe.views.NewPipeTextView
@ -137,7 +137,10 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/tempoControl"
android:layout_margin="@dimen/video_item_search_padding"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="6dp"
android:layout_marginBottom="6dp"
android:background="?attr/separator_color" />
<org.schabi.newpipe.views.NewPipeTextView
@ -156,7 +159,7 @@
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@id/pitchControlText"
android:layout_marginTop="4dp"
android:layout_marginTop="3dp"
android:orientation="horizontal">
<org.schabi.newpipe.views.NewPipeTextView
@ -263,13 +266,16 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/pitchControl"
android:layout_margin="@dimen/video_item_search_padding"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="6dp"
android:background="?attr/separator_color" />
<LinearLayout
android:id="@+id/stepSizeSelector"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="32dp"
android:layout_below="@id/separatorStepSizeSelector"
android:orientation="horizontal">
@ -344,32 +350,37 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/stepSizeSelector"
android:layout_margin="@dimen/video_item_search_padding"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="6dp"
android:background="?attr/separator_color" />
<LinearLayout
android:id="@+id/additionalOptions"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/separatorCheckbox"
android:orientation="vertical">
<CheckBox
android:id="@+id/unhookCheckbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/separatorCheckbox"
android:layout_centerHorizontal="true"
android:checked="false"
android:clickable="true"
android:focusable="true"
android:maxLines="1"
android:text="@string/unhook_checkbox" />
<CheckBox
android:id="@+id/skipSilenceCheckbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/unhookCheckbox"
android:layout_centerHorizontal="true"
android:checked="false"
android:clickable="true"
android:focusable="true"
android:maxLines="1"
android:text="@string/skip_silence_checkbox" />
</LinearLayout>
<!-- END HERE -->