From 90e3d6c6f5d974bb99b1b3a7ed327315078ae8e0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 18 Oct 2017 19:34:31 +0200 Subject: [PATCH] add a toggle for showing extended details over fullscreen media --- .../gallery/activities/SettingsActivity.kt | 9 +++++++++ .../gallery/dialogs/PickMediumDialog.kt | 2 +- .../gallery/helpers/Config.kt | 4 ++++ .../gallery/helpers/Constants.kt | 1 + app/src/main/res/layout/activity_settings.xml | 20 +++++++++++++++++++ app/src/main/res/values-ca/strings.xml | 1 + app/src/main/res/values-cs/strings.xml | 1 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-fi/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-hu/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values-pl/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-pt/strings.xml | 1 + app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values-sk/strings.xml | 1 + app/src/main/res/values-sv/strings.xml | 1 + app/src/main/res/values-tr/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 24 files changed, 54 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt index 8ba896f00..8d8b37c52 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -47,6 +47,7 @@ class SettingsActivity : SimpleActivity() { setupPasswordProtection() setupDeleteEmptyFolders() setupAllowVideoGestures() + setupShowExtendedDetails() updateTextColors(settings_holder) } @@ -214,4 +215,12 @@ class SettingsActivity : SimpleActivity() { ROTATE_BY_DEVICE_ROTATION -> R.string.screen_rotation_device_rotation else -> R.string.screen_rotation_aspect_ratio }) + + private fun setupShowExtendedDetails() { + settings_show_extended_details.isChecked = config.showExtendedDetails + settings_show_extended_details_holder.setOnClickListener { + settings_show_extended_details.toggle() + config.showExtendedDetails = settings_show_extended_details.isChecked + } + } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt index fe0a86add..f89fae804 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt @@ -30,7 +30,7 @@ class PickMediumDialog(val activity: SimpleActivity, val path: String, val callb activity.setupDialogStuff(view, this, R.string.select_photo) val token = object : TypeToken>() {}.type - val media = Gson().fromJson>(activity.config.loadFolderMedia(path), token) ?: ArrayList(1) + val media = Gson().fromJson>(activity.config.loadFolderMedia(path), token) ?: ArrayList(1) if (media.isNotEmpty()) { gotMedia(media) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt index 26f679028..fee7e2ff2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -288,4 +288,8 @@ class Config(context: Context) : BaseConfig(context) { var viewTypeFiles: Int get() = prefs.getInt(VIEW_TYPE_FILES, VIEW_TYPE_GRID) set(viewTypeFiles) = prefs.edit().putInt(VIEW_TYPE_FILES, viewTypeFiles).apply() + + var showExtendedDetails: Boolean + get() = prefs.getBoolean(SHOW_EXTENDED_DETAILS, false) + set(showExtendedDetails) = prefs.edit().putBoolean(SHOW_EXTENDED_DETAILS, showExtendedDetails).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt index d875a0f18..5b88534f3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -39,6 +39,7 @@ val ALLOW_VIDEO_GESTURES = "allow_video_gestures" val TEMP_FOLDER_PATH = "temp_folder_path" val VIEW_TYPE_FOLDERS = "view_type_folders" val VIEW_TYPE_FILES = "view_type_files" +val SHOW_EXTENDED_DETAILS = "show_extended_details" // slideshow val SLIDESHOW_INTERVAL = "slideshow_interval" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index ab5bd8f0e..944390ec8 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -328,6 +328,26 @@ + + + + + + Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures Replace Share with Rotate at fullscreen menu + Show extended details over fullscreen media diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index af7703ab4..b47de3c07 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -125,6 +125,7 @@ Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures Replace Share with Rotate at fullscreen menu + Show extended details over fullscreen media diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 96580f927..45ed9184f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -125,6 +125,7 @@ Nach Löschen leere Ordner löschen Gesten für Videolautstärke/Helligkeit Teilen/Drehen im Vollbild-Menü vertauschen + Show extended details over fullscreen media diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 5b5350d6c..029534ffa 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -125,6 +125,7 @@ Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures Reemplazar Compartir con Girar en el menú de pantalla completa + Show extended details over fullscreen media diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index b0198f6ce..1164fb3db 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -125,6 +125,7 @@ Poista tyhjät kansiot kansion tyhjennyksen jälkeen Salli videon äänenvoimakkuuden ja kirkkauden säätö pystysuorilla eleillä Korvaa jakaminen kääntämisellä koko näytön tilassa + Show extended details over fullscreen media diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index ebec6ea34..7281df1ee 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -125,6 +125,7 @@ Supprimer les dossiers vides après avoir supprimé leur contenu Permettre le contrôle du volume vidéo et de la luminosité avec des gestes verticaux Remplacer Partager par Pivoter si menu en plein écran + Show extended details over fullscreen media diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 7a012c98c..3a1ae7d43 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -125,6 +125,7 @@ Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures Replace Share with Rotate at fullscreen menu + Show extended details over fullscreen media diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index d7310939f..59dca231f 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -125,6 +125,7 @@ Elimina cartelle vuote dopo averne eliminato il contenuto Gestisci il volume e la luminosità dei video con gesti verticali Sostituisci Condividi con Ruota a schermo intero + Show extended details over fullscreen media diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index ef90a0d11..ebc34b95d 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -125,6 +125,7 @@ メディアの削除後にフォルダーが空になった場合、そのフォルダーを削除する ビデオ再生中に、音量と明るさを縦方向のジェスチャーで変更する フルスクリーンメニューの「共有」を「回転」に置き換える + Show extended details over fullscreen media diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 1e4c90da8..d4308631d 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -125,6 +125,7 @@ Usuwaj puste foldery po usunięciu ich zawartości Zezwalaj na kontrolę jasności i głośności filmów pionowymi gestami Zamień funkcję udostępniania na obracanie w menu pełnoekranowym + Show extended details over fullscreen media diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index e549de037..ffdd2b2d2 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -125,6 +125,7 @@ Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures Replace Share with Rotate at fullscreen menu + Show extended details over fullscreen media diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 4da70dedb..88f3db323 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -125,6 +125,7 @@ Apagar as pastas vazias depois de remover o seu conteúdo Permitir controlo do volume e brilho dos vídeos através de gestos verticais Substituir a opção Partilhar pela opção Rodar se em ecrã completo + Show extended details over fullscreen media diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 7cdae2f86..c1ab240a6 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -125,6 +125,7 @@ Удалять пустые папки после удаления их содержимого Управлять громкостью и яркостью видео с помощью вертикальных жестов Заменить \'Поделиться\' на \'Повернуть\' в меню полноэкранного режима + Show extended details over fullscreen media diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 11ef7bbc6..03f404c28 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -125,6 +125,7 @@ Odstrániť prázdne priečinky po vymazaní ich obsahu Povoliť ovládanie hlasitosti a jasu videí vertikálnymi ťahmi Nahradiť Zdieľanie s Otočením v celoobrazovkovom menu + Zobraziť rozšírené vlastnosti ponad celoobrazovkové médiá diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 834755adf..22c827185 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -125,6 +125,7 @@ Ta bort tomma mappar när deras innehåll tas bort Tillåt styrning av videovolym och videoljusstyrka med vertikala gester Ersätt Dela med Rotera i helskärmsmenyn + Show extended details over fullscreen media diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index e98004c41..b24c0198c 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -125,6 +125,7 @@ Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures Replace Share with Rotate at fullscreen menu + Show extended details over fullscreen media diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 1b6a61f9e..859dc941e 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -125,6 +125,7 @@ Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures 替换全屏时菜单栏的“分享”为“旋转” + Show extended details over fullscreen media diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 6f7ec0dc1..8b186d229 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -125,6 +125,7 @@ 刪除內容後刪除空白資料夾 允許用上下手勢來控制影片的音量和亮度 將全螢幕選單的分享取代為旋轉 + Show extended details over fullscreen media diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 383de4003..43594c96c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -125,6 +125,7 @@ Delete empty folders after deleting their content Allow controlling video volume and brightness with vertical gestures Replace Share with Rotate at fullscreen menu + Show extended details over fullscreen media