add a toggle for showing extended details over fullscreen media

This commit is contained in:
tibbi 2017-10-18 19:34:31 +02:00
parent 3033f611a1
commit 90e3d6c6f5
24 changed files with 54 additions and 1 deletions

View file

@ -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
}
}
}

View file

@ -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<List<Medium>>() {}.type
val media = Gson().fromJson<ArrayList<Medium>>(activity.config.loadFolderMedia(path), token) ?: ArrayList<Medium>(1)
val media = Gson().fromJson<ArrayList<Medium>>(activity.config.loadFolderMedia(path), token) ?: ArrayList(1)
if (media.isNotEmpty()) {
gotMedia(media)

View file

@ -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()
}

View file

@ -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"

View file

@ -328,6 +328,26 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_show_extended_details_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_show_extended_details"
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/show_extended_details"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_screen_rotation_holder"
android:layout_width="match_parent"

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Nach Löschen leere Ordner löschen</string>
<string name="allow_video_gestures">Gesten für Videolautstärke/Helligkeit</string>
<string name="replace_share_with_rotate">Teilen/Drehen im Vollbild-Menü vertauschen</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">Reemplazar Compartir con Girar en el menú de pantalla completa</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Poista tyhjät kansiot kansion tyhjennyksen jälkeen</string>
<string name="allow_video_gestures">Salli videon äänenvoimakkuuden ja kirkkauden säätö pystysuorilla eleillä</string>
<string name="replace_share_with_rotate">Korvaa jakaminen kääntämisellä koko näytön tilassa</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Supprimer les dossiers vides après avoir supprimé leur contenu</string>
<string name="allow_video_gestures">Permettre le contrôle du volume vidéo et de la luminosité avec des gestes verticaux</string>
<string name="replace_share_with_rotate">Remplacer Partager par Pivoter si menu en plein écran</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Elimina cartelle vuote dopo averne eliminato il contenuto</string>
<string name="allow_video_gestures">Gestisci il volume e la luminosità dei video con gesti verticali</string>
<string name="replace_share_with_rotate">Sostituisci Condividi con Ruota a schermo intero</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">メディアの削除後にフォルダーが空になった場合、そのフォルダーを削除する</string>
<string name="allow_video_gestures">ビデオ再生中に、音量と明るさを縦方向のジェスチャーで変更する</string>
<string name="replace_share_with_rotate">フルスクリーンメニューの「共有」を「回転」に置き換える</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Usuwaj puste foldery po usunięciu ich zawartości</string>
<string name="allow_video_gestures">Zezwalaj na kontrolę jasności i głośności filmów pionowymi gestami</string>
<string name="replace_share_with_rotate">Zamień funkcję udostępniania na obracanie w menu pełnoekranowym</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Apagar as pastas vazias depois de remover o seu conteúdo</string>
<string name="allow_video_gestures">Permitir controlo do volume e brilho dos vídeos através de gestos verticais</string>
<string name="replace_share_with_rotate">Substituir a opção Partilhar pela opção Rodar se em ecrã completo</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Удалять пустые папки после удаления их содержимого</string>
<string name="allow_video_gestures">Управлять громкостью и яркостью видео с помощью вертикальных жестов</string>
<string name="replace_share_with_rotate">Заменить \'Поделиться\' на \'Повернуть\' в меню полноэкранного режима</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Odstrániť prázdne priečinky po vymazaní ich obsahu</string>
<string name="allow_video_gestures">Povoliť ovládanie hlasitosti a jasu videí vertikálnymi ťahmi</string>
<string name="replace_share_with_rotate">Nahradiť Zdieľanie s Otočením v celoobrazovkovom menu</string>
<string name="show_extended_details">Zobraziť rozšírené vlastnosti ponad celoobrazovkové médiá</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Ta bort tomma mappar när deras innehåll tas bort</string>
<string name="allow_video_gestures">Tillåt styrning av videovolym och videoljusstyrka med vertikala gester</string>
<string name="replace_share_with_rotate">Ersätt Dela med Rotera i helskärmsmenyn</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">替换全屏时菜单栏的“分享”为“旋转”</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">刪除內容後刪除空白資料夾</string>
<string name="allow_video_gestures">允許用上下手勢來控制影片的音量和亮度</string>
<string name="replace_share_with_rotate">將全螢幕選單的分享取代為旋轉</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View file

@ -125,6 +125,7 @@
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
<string name="show_extended_details">Show extended details over fullscreen media</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->