feat: start player maximized pref (#637)
This commit is contained in:
parent
07c58accf0
commit
61ec1edb35
5 changed files with 13 additions and 0 deletions
|
@ -418,6 +418,8 @@ class PlayerGestureHelper(
|
|||
activity.window.attributes.screenBrightness = appPreferences.playerBrightness
|
||||
}
|
||||
|
||||
updateZoomMode(appPreferences.playerStartMaximized)
|
||||
|
||||
@Suppress("ClickableViewAccessibility")
|
||||
playerView.setOnTouchListener { _, event ->
|
||||
if (playerView.useController) {
|
||||
|
|
|
@ -107,6 +107,8 @@
|
|||
<string name="player_gestures_zoom_summary">Pinch to fill the screen with the video</string>
|
||||
<string name="player_gestures_seek_summary">Swipe horizontally to seek forwards or backwards</string>
|
||||
<string name="player_brightness_remember">Remember brightness level</string>
|
||||
<string name="player_start_maximized">Start maximized</string>
|
||||
<string name="player_start_maximized_summary">Open video in maximized mode by default</string>
|
||||
<string name="sort_by_options_0">Title</string>
|
||||
<string name="sort_by_options_1">IMDB Rating</string>
|
||||
<string name="sort_by_options_2">Parental Rating</string>
|
||||
|
|
|
@ -63,6 +63,11 @@
|
|||
app:dependency="pref_player_gestures_vb"
|
||||
app:key="pref_player_brightness_remember"
|
||||
app:title="@string/player_brightness_remember" />
|
||||
<SwitchPreferenceCompat
|
||||
app:dependency="pref_player_gestures_zoom"
|
||||
app:key="pref_player_start_maximized"
|
||||
app:summary="@string/player_start_maximized_summary"
|
||||
app:title="@string/player_start_maximized" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="@string/seeking">
|
||||
|
|
|
@ -51,6 +51,9 @@ constructor(
|
|||
val playerBrightnessRemember get() =
|
||||
sharedPreferences.getBoolean(Constants.PREF_PLAYER_BRIGHTNESS_REMEMBER, false)
|
||||
|
||||
val playerStartMaximized get() =
|
||||
sharedPreferences.getBoolean(Constants.PREF_PLAYER_START_MAXIMIZED, false)
|
||||
|
||||
var playerBrightness: Float
|
||||
get() = sharedPreferences.getFloat(
|
||||
Constants.PREF_PLAYER_BRIGHTNESS,
|
||||
|
|
|
@ -17,6 +17,7 @@ object Constants {
|
|||
const val PREF_PLAYER_GESTURES_ZOOM = "pref_player_gestures_zoom"
|
||||
const val PREF_PLAYER_GESTURES_SEEK = "pref_player_gestures_seek"
|
||||
const val PREF_PLAYER_BRIGHTNESS_REMEMBER = "pref_player_brightness_remember"
|
||||
const val PREF_PLAYER_START_MAXIMIZED = "pref_player_start_maximized"
|
||||
const val PREF_PLAYER_BRIGHTNESS = "pref_player_brightness"
|
||||
const val PREF_PLAYER_SEEK_BACK_INC = "pref_player_seek_back_inc"
|
||||
const val PREF_PLAYER_SEEK_FORWARD_INC = "pref_player_seek_forward_inc"
|
||||
|
|
Loading…
Reference in a new issue