From e6d5df2ae1a4b42187c5249786b8e58df6a95649 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 18 Nov 2018 21:14:25 +0100 Subject: [PATCH] adding a couple changes related to displaying video length at thumbnails --- .../gallery/pro/activities/SettingsActivity.kt | 12 ++++++------ .../gallery/pro/adapters/MediaAdapter.kt | 11 ++++++++--- .../gallery/pro/fragments/VideoFragment.kt | 9 +-------- .../gallery/pro/helpers/Config.kt | 6 +++--- .../gallery/pro/helpers/Constants.kt | 4 ++-- .../simplemobiletools/gallery/pro/models/Medium.kt | 14 ++++++++++++++ app/src/main/res/layout/activity_settings.xml | 6 +++--- app/src/main/res/values-ar/strings.xml | 2 +- app/src/main/res/values-az/strings.xml | 2 +- app/src/main/res/values-ca/strings.xml | 2 +- app/src/main/res/values-cs/strings.xml | 2 +- app/src/main/res/values-da/strings.xml | 2 +- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-el/strings.xml | 2 +- app/src/main/res/values-es/strings.xml | 2 +- app/src/main/res/values-fi/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-gl/strings.xml | 2 +- app/src/main/res/values-hr/strings.xml | 2 +- app/src/main/res/values-hu/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 2 +- app/src/main/res/values-ja/strings.xml | 2 +- app/src/main/res/values-ko-rKR/strings.xml | 2 +- app/src/main/res/values-lt/strings.xml | 2 +- app/src/main/res/values-nb/strings.xml | 2 +- app/src/main/res/values-nl/strings.xml | 2 +- app/src/main/res/values-pl/strings.xml | 2 +- app/src/main/res/values-pt-rBR/strings.xml | 2 +- app/src/main/res/values-pt/strings.xml | 2 +- app/src/main/res/values-ru/strings.xml | 2 +- app/src/main/res/values-sk/strings.xml | 2 +- app/src/main/res/values-sl/strings.xml | 2 +- app/src/main/res/values-sv/strings.xml | 2 +- app/src/main/res/values-tr/strings.xml | 2 +- app/src/main/res/values-uk/strings.xml | 2 +- app/src/main/res/values-zh-rCN/strings.xml | 2 +- app/src/main/res/values-zh-rTW/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 38 files changed, 68 insertions(+), 56 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt index 4c64fd184..8426bd8c4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt @@ -57,7 +57,7 @@ class SettingsActivity : SimpleActivity() { setupAllowVideoGestures() setupAllowDownGesture() setupBottomActions() - setupVideoLength() + setupThumbnailVideoDuration() setupShowMediaCount() setupKeepLastModified() setupShowInfoBubble() @@ -197,11 +197,11 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupVideoLength() { - settings_show_video_length.isChecked = config.videoLengthThumbnail - settings_show_video_length_holder.setOnClickListener { - settings_show_video_length.toggle() - config.videoLengthThumbnail = settings_show_video_length.isChecked + private fun setupThumbnailVideoDuration() { + settings_show_thumbnail_video_duration.isChecked = config.showThumbnailVideoDuration + settings_show_thumbnail_video_duration_holder.setOnClickListener { + settings_show_thumbnail_video_duration.toggle() + config.showThumbnailVideoDuration = settings_show_thumbnail_video_duration.isChecked } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 7e5fa5f02..0eb370a53 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.pro.adapters import android.content.ContentProviderOperation import android.media.ExifInterface +import android.media.MediaMetadataRetriever import android.os.Handler import android.os.Looper import android.provider.MediaStore @@ -451,12 +452,16 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index e465b3735..be1816094 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -143,7 +143,7 @@ عرض صور GIF المتحركة في الصور المصغرة أقصى سطوع عند عرض الوسائط قص الصور المصغرة الى مستطيلات - Show length of the video + Show video durations تدوير وسائط ملء الشاشة بواسطة اعدادات النظام تدوير الجهاز diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index c97770bc3..8c16cfb68 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -139,7 +139,7 @@ Animate GIFs at thumbnails Max brightness when viewing fullscreen media Crop thumbnails into squares - Show length of the video + Show video durations Rotate fullscreen media by System setting Device rotation diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 2eb653964..1f95546eb 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -139,7 +139,7 @@ Animar les miniatures dels GIFs Brillantor màxima quan es mostra multimèdia Retallar miniatures en quadrats - Show length of the video + Show video durations Gira els mitjans a pantalla completa segons Configuració del sistema Rotació del dispositiu diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index f80f0f054..e1508fa1d 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -139,7 +139,7 @@ Animovat náhledy souborů GIF Nastavit jas obrazovky na max při zobrazení médií Oříznout náhledy na čtverce - Show length of the video + Show video durations Otočit média podle Systémového nastavení Otočení zařízení diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index e23ecef3f..27f14a352 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -139,7 +139,7 @@ Animér GIF\'er i miniaturer Maksimal lysstyrke ved fuldskærmsvisning af medier Beskær miniaturer til kvadrater - Show length of the video + Show video durations Roter fuldskærmsmedier efter Systemindstilling Enhedens orientering diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 38b8a4fba..68b4006c0 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -139,7 +139,7 @@ Kacheln von GIFs animieren Helligkeit beim Betrachten maximieren Kacheln quadratisch zuschneiden - Show length of the video + Show video durations Im Vollbild ausrichten nach: Systemeinstellung Gerätedrehung diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 383890d71..fd2092f1b 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -139,7 +139,7 @@ Εμφάνιση κινούμενων GIFs στα εικονίδια Μέγιστη φωτεινότητα κατά την προβολή πλήρους οθόνης Κόψιμο εικονιδίων σε τετράγωνα - Show length of the video + Show video durations Περιστροφή σε πλήρη οθόνη απο Ρυθμίσεις συστήματος Περιστροφή συσκευής diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index b05f01a21..ebb00282f 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -139,7 +139,7 @@ Animar las miniaturas de GIFs Brillo máximo cuando se muestra multimedia Recortar miniaturas en cuadrados - Show length of the video + Show video durations Rotar multimedia en pantalla completa según Configuración del sistema Rotación del dispositivo diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index c3a879d10..8d68f516f 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -139,7 +139,7 @@ Animoi GIFit pienoiskuvissa Täysi kirkkaus mediaa katsoessa Leikkaa pienoiskuvat neliöiksi - Show length of the video + Show video durations Käännä koko ruudun mediaa Järjestelmän asetukset Laitteen kierto diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 470e84808..6ea7221f7 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -139,7 +139,7 @@ GIFs animés sur les miniatures Luminosité maximale Recadrer les miniatures en carrés - Show length of the video + Show video durations Pivoter l\'affichage selon Paramètres système Rotation de l\'appareil diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 2a583912f..fbb4313c3 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -139,7 +139,7 @@ Animar os GIFs na icona Brillo ao máximo cando mire medios Recortar iconas a cadrados - Show length of the video + Show video durations Rotar medios a pantalla completa a Axuste do sistema Rotación do dispositivo diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 5e1d73b54..bc3f76b5e 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -139,7 +139,7 @@ Prikaz animacije GIF-ova na sličicama Maksimalna svjetlina pri pregledu datoteka Izreži sličice u kvadrate - Show length of the video + Show video durations Rotiraj datoteku u punom zaslonu za Postavke sustava Rotacija uređaja diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index e37995d8e..ffc2e6ad0 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -140,7 +140,7 @@ Animált GIF miniatűr Maximális fényerő a teljes képernyős médiánál Miniatűrök négyzet alakúra vágva - Show length of the video + Show video durations Teljes képernyős média forgatása Rendszer beállítások Eszköz elforgatás diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index e56fe7afe..fd9fa8d1f 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -139,7 +139,7 @@ Anima le GIF in miniatura Luminosità max durante la visualizzazione Ritaglia le miniature in quadrati - Show length of the video + Show video durations Ruota schermo per Impostazione di sistema Rotazione dispositivo diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 1fb37bbe1..382b9a457 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -139,7 +139,7 @@ アニメーションGIFを動かす 再生時には明るさを最大にする サムネイルを正方形に切り取る - Show length of the video + Show video durations フルスクリーン再生の表示切り替え システム設定に従う 端末の向きに従う diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 478276804..edbec53bb 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -139,7 +139,7 @@ 섬네일에서 GIFs 애니메이션 활성화 미디어 최대 밝기 미리보기 사각형으로 자름 - Show length of the video + Show video durations 전체화면으로 회전기준 시스템 설정 디바이스 회전 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 88d76893d..a356a42fa 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -139,7 +139,7 @@ Animuoti GIF\'us miniatiūrose Maksimalus ryškumas, kai medija peržiūrima viso ekrano rėžimu Apkirpti miniatiūras kvadratu - Show length of the video + Show video durations Sukti viso ekrano mediją pagal Sistemos nustatymai Įrenginio sukimas diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index dd90bb4b7..142098f01 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -139,7 +139,7 @@ Animert GIF i minibildevisning Maks lysstyrke ved mediavisning Beskjær minibilder i kvadrater - Show length of the video + Show video durations Roter media etter Systeminnstilling Enhetsrotasjon diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 54eb07781..a6211e081 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -139,7 +139,7 @@ GIF-bestanden afspelen in overzicht Maximale helderheid in volledig scherm Miniatuurvoorbeelden bijsnijden - Show length of the video + Show video durations Media in volledig scherm roteren volgens Systeeminstelling Oriëntatie van apparaat diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index ac0e46515..b87f8eb80 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -139,7 +139,7 @@ Animowane miniatury GIFów Maksymalna jasność podczas wyświetlania multimediów Przycinaj miniatury do kwadratów - Show length of the video + Show video durations Obracaj pełnoekranowe multimedia według Ustawień systemowych Orientacji urządzenia diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 9173b3749..81e8c2549 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -139,7 +139,7 @@ Animação de GIFs nas miniaturas Brilho máximo ao visualizar mídia Recortar miniaturas em quadrados - Show length of the video + Show video durations Critério para rotação de tela Padrão do sistema Sensor do aparelho diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 8656f2357..cdc14e274 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -139,7 +139,7 @@ Animação de GIF nas miniaturas Brilho máximo permitido Recortar miniaturas em quadrados - Show length of the video + Show video durations Rodar em ecrã completo por Definições do sistema Rotação do dispositivo diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index ef0f855ef..61525dced 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -139,7 +139,7 @@ Анимировать эскизы GIF Максимальная яркость при просмотре файлов Нарезать миниатюры в квадраты - Show length of the video + Show video durations Поворот экрана при просмотре изображения Использовать системные настройки При повороте устройства diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index d26e8e0e5..fb6bb3a3f 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -139,7 +139,7 @@ Animovať GIF súbory pri náhľade Maximálny jas pri prezeraní médií Orezať náhľady na štvorce - Show length of the video + Zobraziť dĺžku videí Otáčať obrazovku podľa Rotate fullscreen media by Systémového nastavenia Otočenia zariadenia diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 3883b0593..a14ef459d 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -139,7 +139,7 @@ Animiraj GIFe v predogledu Najvišja svetlost pri celozaslonskem predvajanju Obreži predoglede slik v kvadrate - Show length of the video + Show video durations Zavrti celozaslonski medij za Sistemska nastavitev Obračanje naprave diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index fc6db1256..98538ba69 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -139,7 +139,7 @@ Animera GIF-bilders miniatyrer Maximal ljusstyrka när media visas i helskärmsläge Beskär miniatyrer till kvadrater - Show length of the video + Show video durations Rotera media i helskärmsläge Systeminställning Enhetens rotation diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 2620d945a..88bb53d8e 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -139,7 +139,7 @@ Küçük resimlerdeki GIF\'leri hareketlendir Tam ekran medya görüntülerken maksimum parlaklık Küçük resimleri karelere kırp - Show length of the video + Show video durations Tam ekran medyayı döndür Sistem ayarları Cihaz yönü diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 0a7bbd815..b53544b9a 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -139,7 +139,7 @@ Анімувати ескізи GIF-файлів Максимальна яскравість екрану при повноекранному перегляді медіафайлу Обрізати ескізи у квадрат - Show length of the video + Show video durations При повноекранному перегляді обертати за… системними налаштуваннями поворотом пристрою diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index c848349d4..daa87bcf1 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -139,7 +139,7 @@ GIF 缩略图 浏览时最大亮度 裁剪缩略图 - Show length of the video + Show video durations 全屏方向 系统设置 设备方向 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 953bfc6b9..7da58d214 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -139,7 +139,7 @@ 縮圖顯示GIF動畫 瀏覽時最大亮度 縮圖裁剪成正方形 - Show length of the video + Show video durations 全螢幕時旋轉方向 系統設定方向 裝置實際方向 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d0c56abf3..668379dd5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -139,7 +139,7 @@ Animate GIFs at thumbnails Max brightness when viewing fullscreen media Crop thumbnails into squares - Show length of the video + Show video durations Rotate fullscreen media by System setting Device rotation