mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
seek increment to slider preference
This commit is contained in:
parent
2b0d29c52c
commit
f3b8433f1b
@ -12,4 +12,11 @@ object PreferenceRanges {
|
|||||||
0.25f,
|
0.25f,
|
||||||
1.0f
|
1.0f
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val seekIncrement = SliderRange(
|
||||||
|
5f,
|
||||||
|
60f,
|
||||||
|
5f,
|
||||||
|
10f
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,8 @@ import com.github.libretube.extensions.formatShort
|
|||||||
import com.github.libretube.extensions.hideKeyboard
|
import com.github.libretube.extensions.hideKeyboard
|
||||||
import com.github.libretube.extensions.query
|
import com.github.libretube.extensions.query
|
||||||
import com.github.libretube.extensions.toID
|
import com.github.libretube.extensions.toID
|
||||||
import com.github.libretube.models.interfaces.PlayerOptionsInterface
|
|
||||||
import com.github.libretube.models.PlayerViewModel
|
import com.github.libretube.models.PlayerViewModel
|
||||||
|
import com.github.libretube.models.interfaces.PlayerOptionsInterface
|
||||||
import com.github.libretube.services.BackgroundMode
|
import com.github.libretube.services.BackgroundMode
|
||||||
import com.github.libretube.services.DownloadService
|
import com.github.libretube.services.DownloadService
|
||||||
import com.github.libretube.ui.activities.MainActivity
|
import com.github.libretube.ui.activities.MainActivity
|
||||||
|
@ -31,6 +31,7 @@ class SliderPreference(
|
|||||||
val range = when (key) {
|
val range = when (key) {
|
||||||
PreferenceKeys.PLAYBACK_SPEED -> PreferenceRanges.playbackSpeed
|
PreferenceKeys.PLAYBACK_SPEED -> PreferenceRanges.playbackSpeed
|
||||||
PreferenceKeys.BACKGROUND_PLAYBACK_SPEED -> PreferenceRanges.playbackSpeed
|
PreferenceKeys.BACKGROUND_PLAYBACK_SPEED -> PreferenceRanges.playbackSpeed
|
||||||
|
PreferenceKeys.SEEK_INCREMENT -> PreferenceRanges.seekIncrement
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,19 +263,6 @@
|
|||||||
<item>mpeg</item>
|
<item>mpeg</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="seekIncrement">
|
|
||||||
<item>5s</item>
|
|
||||||
<item>10s</item>
|
|
||||||
<item>20s</item>
|
|
||||||
<item>30s</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="seekIncrementValues">
|
|
||||||
<item>5</item>
|
|
||||||
<item>10</item>
|
|
||||||
<item>20</item>
|
|
||||||
<item>30</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string-array name="fullscreenOrientation">
|
<string-array name="fullscreenOrientation">
|
||||||
<item>@string/aspect_ratio</item>
|
<item>@string/aspect_ratio</item>
|
||||||
<item>@string/auto_rotation</item>
|
<item>@string/auto_rotation</item>
|
||||||
|
@ -10,14 +10,11 @@
|
|||||||
app:key="playback_speed"
|
app:key="playback_speed"
|
||||||
app:title="@string/playback_speed" />
|
app:title="@string/playback_speed" />
|
||||||
|
|
||||||
<ListPreference
|
<com.github.libretube.ui.views.SliderPreference
|
||||||
android:icon="@drawable/ic_skip"
|
android:icon="@drawable/ic_skip"
|
||||||
app:defaultValue="5"
|
app:defaultValue="5"
|
||||||
app:entries="@array/seekIncrement"
|
|
||||||
app:entryValues="@array/seekIncrementValues"
|
|
||||||
app:key="seek_increment"
|
app:key="seek_increment"
|
||||||
app:title="@string/seek_increment"
|
app:title="@string/seek_increment" />
|
||||||
app:useSimpleSummaryProvider="true" />
|
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:icon="@drawable/ic_time"
|
android:icon="@drawable/ic_time"
|
||||||
|
Loading…
Reference in New Issue
Block a user