refactor: reorganize player settings

This commit is contained in:
Bnyro 2024-02-05 17:01:36 +01:00
parent 72f8bc70d7
commit f814630f41
2 changed files with 37 additions and 32 deletions

View File

@ -512,6 +512,7 @@
<string name="add_to_group">Add to group</string>
<string name="uptime">%.2f%% uptime</string>
<string name="change">Change</string>
<string name="gestures">Gestures</string>
<!-- Notification channel strings -->
<string name="download_channel_name">Download Service</string>

View File

@ -2,7 +2,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory app:title="@string/behavior">
<PreferenceCategory app:title="@string/gestures">
<SwitchPreferenceCompat
android:defaultValue="true"
@ -24,13 +24,6 @@
app:key="player_pinch_control"
app:title="@string/pinch_control" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:icon="@drawable/ic_next"
android:summary="@string/skip_buttons_summary"
app:key="skip_buttons"
app:title="@string/skip_buttons" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@drawable/ic_skip"
@ -38,6 +31,26 @@
app:key="double_tap_seek"
app:title="@string/double_tap_seek" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/behavior">
<com.github.libretube.ui.views.SliderPreference
android:icon="@drawable/ic_skip"
app:defValue="10.0"
app:key="seek_increment"
app:stepSize="5.0"
app:title="@string/seek_increment"
app:valueFrom="5.0"
app:valueTo="60.0" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:icon="@drawable/ic_next"
android:summary="@string/skip_buttons_summary"
app:key="skip_buttons"
app:title="@string/skip_buttons" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@drawable/ic_window"
@ -62,15 +75,6 @@
app:title="@string/fullscreen_orientation"
app:useSimpleSummaryProvider="true" />
<com.github.libretube.ui.views.SliderPreference
android:icon="@drawable/ic_skip"
app:defValue="10.0"
app:key="seek_increment"
app:stepSize="5.0"
app:title="@string/seek_increment"
app:valueFrom="5.0"
app:valueTo="60.0" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/captions">
@ -196,12 +200,14 @@
<PreferenceCategory app:title="@string/misc">
<SwitchPreferenceCompat
android:icon="@drawable/ic_pause_filled"
android:summary="@string/pauseOnScreenOff_summary"
app:defaultValue="false"
app:key="pause_screen_off"
app:title="@string/pauseOnScreenOff" />
<ListPreference
android:icon="@drawable/ic_time"
app:defaultValue="50"
app:entries="@array/bufferingGoal"
app:entryValues="@array/bufferingGoalValues"
app:key="buffering_goal"
app:summary="@string/buffering_goal_summary"
app:title="@string/buffering_goal" />
<SwitchPreferenceCompat
android:icon="@drawable/ic_call"
@ -218,21 +224,19 @@
app:key="alternative_pip_controls"
app:title="@string/alternative_pip_controls" />
<SwitchPreferenceCompat
android:icon="@drawable/ic_pause_filled"
android:summary="@string/pauseOnScreenOff_summary"
app:defaultValue="false"
app:key="pause_screen_off"
app:title="@string/pauseOnScreenOff" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:icon="@drawable/ic_pause_filled"
app:key="pause_on_quit"
app:title="@string/pause_on_quit" />
<ListPreference
android:icon="@drawable/ic_time"
app:defaultValue="50"
app:entries="@array/bufferingGoal"
app:entryValues="@array/bufferingGoalValues"
app:key="buffering_goal"
app:summary="@string/buffering_goal_summary"
app:title="@string/buffering_goal" />
</PreferenceCategory>
</PreferenceScreen>