mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
add a toggle for hiding system ui at fullscreen media automatically
This commit is contained in:
parent
19a2aa71bf
commit
c42be23acc
21 changed files with 51 additions and 0 deletions
|
@ -36,6 +36,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
setupScrollHorizontally()
|
setupScrollHorizontally()
|
||||||
setupScreenRotation()
|
setupScreenRotation()
|
||||||
setupShowMedia()
|
setupShowMedia()
|
||||||
|
setupHideSystemUI()
|
||||||
updateTextColors(settings_holder)
|
updateTextColors(settings_holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,6 +122,14 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupHideSystemUI() {
|
||||||
|
settings_hide_system_ui.isChecked = config.hideSystemUI
|
||||||
|
settings_hide_system_ui_holder.setOnClickListener {
|
||||||
|
settings_hide_system_ui.toggle()
|
||||||
|
config.hideSystemUI = settings_hide_system_ui.isChecked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupScreenRotation() {
|
private fun setupScreenRotation() {
|
||||||
settings_screen_rotation.text = getScreenRotationText()
|
settings_screen_rotation.text = getScreenRotationText()
|
||||||
settings_screen_rotation_holder.setOnClickListener {
|
settings_screen_rotation_holder.setOnClickListener {
|
||||||
|
|
|
@ -224,4 +224,8 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
var scrollHorizontally: Boolean
|
var scrollHorizontally: Boolean
|
||||||
get() = prefs.getBoolean(SCROLL_HORIZONTALLY, false)
|
get() = prefs.getBoolean(SCROLL_HORIZONTALLY, false)
|
||||||
set(scrollHorizontally) = prefs.edit().putBoolean(SCROLL_HORIZONTALLY, scrollHorizontally).apply()
|
set(scrollHorizontally) = prefs.edit().putBoolean(SCROLL_HORIZONTALLY, scrollHorizontally).apply()
|
||||||
|
|
||||||
|
var hideSystemUI: Boolean
|
||||||
|
get() = prefs.getBoolean(HIDE_SYSTEM_UI, false)
|
||||||
|
set(hideSystemUI) = prefs.edit().putBoolean(HIDE_SYSTEM_UI, hideSystemUI).apply()
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ val EXCLUDED_FOLDERS = "excluded_folders"
|
||||||
val INCLUDED_FOLDERS = "included_folders"
|
val INCLUDED_FOLDERS = "included_folders"
|
||||||
val ALBUM_COVERS = "album_covers"
|
val ALBUM_COVERS = "album_covers"
|
||||||
val SCROLL_HORIZONTALLY = "scroll_horizontally"
|
val SCROLL_HORIZONTALLY = "scroll_horizontally"
|
||||||
|
val HIDE_SYSTEM_UI = "hide_system_ui"
|
||||||
|
|
||||||
val NOMEDIA = ".nomedia"
|
val NOMEDIA = ".nomedia"
|
||||||
|
|
||||||
|
|
|
@ -228,6 +228,26 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_hide_system_ui_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
|
android:id="@+id/settings_hide_system_ui"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/hide_system_ui_at_fullscreen"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_screen_rotation_holder"
|
android:id="@+id/settings_screen_rotation_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Seitenverhältnis</string>
|
<string name="screen_rotation_aspect_ratio">Seitenverhältnis</string>
|
||||||
<string name="dark_background_at_fullscreen">Schwarzer Hintergrund im Vollbild</string>
|
<string name="dark_background_at_fullscreen">Schwarzer Hintergrund im Vollbild</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Kacheln horizontal scrollen</string>
|
<string name="scroll_thumbnails_horizontally">Kacheln horizontal scrollen</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Relación de aspecto</string>
|
<string name="screen_rotation_aspect_ratio">Relación de aspecto</string>
|
||||||
<string name="dark_background_at_fullscreen">Utilizar siempre fondo oscuro en pantalla completa</string>
|
<string name="dark_background_at_fullscreen">Utilizar siempre fondo oscuro en pantalla completa</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Ratio d\'aspect</string>
|
<string name="screen_rotation_aspect_ratio">Ratio d\'aspect</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Proporzioni</string>
|
<string name="screen_rotation_aspect_ratio">Proporzioni</string>
|
||||||
<string name="dark_background_at_fullscreen">Sfondo scuro a schermo intero</string>
|
<string name="dark_background_at_fullscreen">Sfondo scuro a schermo intero</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Proporção da mídia</string>
|
<string name="screen_rotation_aspect_ratio">Proporção da mídia</string>
|
||||||
<string name="dark_background_at_fullscreen">Fundo de tela escuro em mídia tela cheia</string>
|
<string name="dark_background_at_fullscreen">Fundo de tela escuro em mídia tela cheia</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Rolar miniaturas horizontalmente</string>
|
<string name="scroll_thumbnails_horizontally">Rolar miniaturas horizontalmente</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Proporção</string>
|
<string name="screen_rotation_aspect_ratio">Proporção</string>
|
||||||
<string name="dark_background_at_fullscreen">Usar sempre um fundo escuro se em ecrã completo</string>
|
<string name="dark_background_at_fullscreen">Usar sempre um fundo escuro se em ecrã completo</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Deslocação horizontal de miniaturas</string>
|
<string name="scroll_thumbnails_horizontally">Deslocação horizontal de miniaturas</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Соотношение сторон</string>
|
<string name="screen_rotation_aspect_ratio">Соотношение сторон</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Pomeru strán</string>
|
<string name="screen_rotation_aspect_ratio">Pomeru strán</string>
|
||||||
<string name="dark_background_at_fullscreen">Tmavé pozadie pri médiách na celú obrazovku</string>
|
<string name="dark_background_at_fullscreen">Tmavé pozadie pri médiách na celú obrazovku</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Prehliadať miniatúry vodorovne</string>
|
<string name="scroll_thumbnails_horizontally">Prehliadať miniatúry vodorovne</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automaticky skrývať systémové lišty pri celoobrazovkových médiách</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">En-boy oranı</string>
|
<string name="screen_rotation_aspect_ratio">En-boy oranı</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">根据长宽比</string>
|
<string name="screen_rotation_aspect_ratio">根据长宽比</string>
|
||||||
<string name="dark_background_at_fullscreen">全屏时黑色背景</string>
|
<string name="dark_background_at_fullscreen">全屏时黑色背景</string>
|
||||||
<string name="scroll_thumbnails_horizontally">水平滚动缩略图</string>
|
<string name="scroll_thumbnails_horizontally">水平滚动缩略图</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
|
||||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
<!-- Short description has to have less than 80 chars -->
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
|
Loading…
Reference in a new issue