From ef86df4ac1a41ab6132b36f23a9bc184e676f727 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 09:11:05 +0100 Subject: [PATCH 01/14] add a string for replacing deep zoomable images with better quality ones --- app/src/main/res/values-ar/strings.xml | 1 + 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-gl/strings.xml | 1 + app/src/main/res/values-hr/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-ko-rKR/strings.xml | 1 + app/src/main/res/values-nb/strings.xml | 1 + app/src/main/res/values-nl/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 + 25 files changed, 25 insertions(+) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 1e162b86c..2360d8a9d 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -137,6 +137,7 @@ إدارة المجلدات المستبعدة Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 6f1726843..aae41643c 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -133,6 +133,7 @@ Gestioneu els detalls ampliats Permet fer zoom amb un sol dit a pantalla complerta Permet canviar els mitjans de manera instantània fent clic als costats de la pantalla + Replace deep zoomable images with better quality ones Miniatures diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 59d2f5b5b..7d1da76f2 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -133,6 +133,7 @@ Manage extended details Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 0dbe9ba7c..e524d96cb 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -133,6 +133,7 @@ Eigenschaften auswählen Erlaube Ein-Finger-Zoom im Vollbild Wechsle sofort zwischen Medien beim Klicken auf eine Bildschirmseite + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 6b5bba3b3..b9b998d73 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -133,6 +133,7 @@ Administrar detalles ampliados Permitir zoom con un dedo en pantalla completa Permitir el cambio instantáneo de medios haciendo clic en los lados de la pantalla + Replace deep zoomable images with better quality ones Miniaturas diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 0ebfd563c..9c1129fc2 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -133,6 +133,7 @@ Manage extended details Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 8bf9120cc..43491cf17 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -133,6 +133,7 @@ Gérer les détails supplémentaires Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index d20147d76..14a23e27f 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -133,6 +133,7 @@ Xestionar información polo miúdo Permitir zoom con un dedo a pantalla completa Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index c3fa34712..94da9d140 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -133,6 +133,7 @@ Upravljaj detaljnim informacijama Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index b170b2ae3..3f569851e 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -133,6 +133,7 @@ Manage extended details Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 341c91f91..fea2f6b59 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -133,6 +133,7 @@ Gestisci le informazioni estese Abilita zoom con un dito su media a schermo intero Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 4ec08d44e..d49dff3a7 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -133,6 +133,7 @@ Manage extended details Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 4e8b1eb70..9790ccc91 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -133,6 +133,7 @@ 확장된 세부정보 관리 Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index e88d5fff1..89b70ac56 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -133,6 +133,7 @@ Velg detaljer Tillat en-finger-zoom i mediavisningen Tillat å skifte media øyeblikkelig ved å klikke på kanten av skjermen + Replace deep zoomable images with better quality ones Minibilder diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 321d551ff..7b8032756 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -133,6 +133,7 @@ Uitgebreide informatie Met één vinger zoomen in volledig scherm Direct naar vorige/volgende door op de zijkanten van het scherm te tikken + Replace deep zoomable images with better quality ones Miniatuurvoorbeelden diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 8ae734ff3..4b61d2b4d 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -133,6 +133,7 @@ Zarządzaj dodatkowymi szczegółami Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index f902c70b9..409fd41d4 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -133,6 +133,7 @@ Gerenciar detalhes extendidos Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 4fb410d4d..fa2a276c1 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -133,6 +133,7 @@ Gerir detalhes exibidos Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2f7181162..7035d21fa 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -133,6 +133,7 @@ Выбрать подробности файла Масштабирование одним пальцем в полноэкранном режиме Мгновенное переключение медиафайлов нажатием по краю экрана + Replace deep zoomable images with better quality ones Миниатюры diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 879c506ab..f20c05bfb 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -133,6 +133,7 @@ Spravovať rozšírené vlastnosti Povoliť približovanie jedným prstom v celoobrazovkovom režime Povoliť instantné prepínanie médií kliknutím na okraj obrazovky + Nahradiť hlboko priblížiteľné obrázky s obrázkami s lepšou kvalitou Thumbnails diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 3f16c064c..450461510 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -133,6 +133,7 @@ Hantera utökad information Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index d93037695..b31792dd3 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -133,6 +133,7 @@ Manage extended details Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 2f2102a94..dbfe93bf6 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -133,6 +133,7 @@ 要显示的详细信息项目 单指缩放 通过单击屏幕边缘来切换媒体 + Replace deep zoomable images with better quality ones 缩略图 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index b73db9377..1aa0bf2ac 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -133,6 +133,7 @@ 管理詳細資訊 Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b5415b8b3..b0a2c8393 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -133,6 +133,7 @@ Manage extended details Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides + Replace deep zoomable images with better quality ones Thumbnails From 4a2197031d6182cda4a65b2d5fd0b151d3e9fbee Mon Sep 17 00:00:00 2001 From: Pzqqt <821026875@qq.com> Date: Sun, 28 Jan 2018 16:31:04 +0800 Subject: [PATCH 02/14] Update strings.xml --- app/src/main/res/values-zh-rCN/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index dbfe93bf6..77e1a60d1 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -133,7 +133,7 @@ 要显示的详细信息项目 单指缩放 通过单击屏幕边缘来切换媒体 - Replace deep zoomable images with better quality ones + 用质量更好的图像替换可深度缩放的图像 缩略图 From 245c38fecc364bf3ebc0704f794672a2ff96aaa1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 12:10:28 +0100 Subject: [PATCH 03/14] add some extended details related strings --- app/src/main/res/values-ar/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-de/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-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 | 6 ++++-- app/src/main/res/values-sv/strings.xml | 2 ++ app/src/main/res/values-tr/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 ++ 25 files changed, 52 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 2360d8a9d..580b02f68 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -138,10 +138,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index aae41643c..3a9d14765 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -134,10 +134,12 @@ Permet fer zoom amb un sol dit a pantalla complerta Permet canviar els mitjans de manera instantània fent clic als costats de la pantalla Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Miniatures Mitjans a pantalla completa + Extended details diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 7d1da76f2..859adbd5f 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index e524d96cb..f8312ab60 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -134,10 +134,12 @@ Erlaube Ein-Finger-Zoom im Vollbild Wechsle sofort zwischen Medien beim Klicken auf eine Bildschirmseite Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Vollbild-Medien + Extended details diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index b9b998d73..48d62891a 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -134,10 +134,12 @@ Permitir zoom con un dedo en pantalla completa Permitir el cambio instantáneo de medios haciendo clic en los lados de la pantalla Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Miniaturas Medios a pantalla compelta + Extended details diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 9c1129fc2..45386c324 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 43491cf17..51702b67f 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 14a23e27f..31b8eb039 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -134,10 +134,12 @@ Permitir zoom con un dedo a pantalla completa Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 94da9d140..9de39af66 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 3f569851e..d2ff7481a 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index fea2f6b59..a040ee80d 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -134,10 +134,12 @@ Abilita zoom con un dito su media a schermo intero Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index d49dff3a7..c2d4de191 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 9790ccc91..03a188346 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 89b70ac56..761fa1a36 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -134,10 +134,12 @@ Tillat en-finger-zoom i mediavisningen Tillat å skifte media øyeblikkelig ved å klikke på kanten av skjermen Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Minibilder Mediavisning + Extended details diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 7b8032756..620635981 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -134,10 +134,12 @@ Met één vinger zoomen in volledig scherm Direct naar vorige/volgende door op de zijkanten van het scherm te tikken Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Miniatuurvoorbeelden Volledig scherm + Extended details diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 4b61d2b4d..5b5505b85 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 409fd41d4..f7e31c054 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index fa2a276c1..8afac4e8d 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 7035d21fa..2493e295b 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -134,10 +134,12 @@ Масштабирование одним пальцем в полноэкранном режиме Мгновенное переключение медиафайлов нажатием по краю экрана Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Миниатюры Полноэкранное отображение медиафайлов + Extended details diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index f20c05bfb..aeb067881 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -134,10 +134,12 @@ Povoliť približovanie jedným prstom v celoobrazovkovom režime Povoliť instantné prepínanie médií kliknutím na okraj obrazovky Nahradiť hlboko priblížiteľné obrázky s obrázkami s lepšou kvalitou + Skryť rozšírené vlastnosti ak je skrytá stavová lišta - Thumbnails - Fullscreen media + Náhľady + Celoobrazovkový režim + Rozšírené vlastnosti diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 450461510..a4c380455 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index b31792dd3..fdb8ddf11 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 77e1a60d1..31a2665d4 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -134,10 +134,12 @@ 单指缩放 通过单击屏幕边缘来切换媒体 用质量更好的图像替换可深度缩放的图像 + Hide extended details when status bar is hidden 缩略图 全屏显示媒体 + Extended details diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 1aa0bf2ac..d59ddb4f4 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b0a2c8393..5cea74dfe 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -134,10 +134,12 @@ Allow one finger zoom at fullscreen media Allow instantly changing media by clicking on screen sides Replace deep zoomable images with better quality ones + Hide extended details when status bar is hidden Thumbnails Fullscreen media + Extended details From a10bb5aa588e82b3e39bc4e06cce68ac62115429 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 12:27:56 +0100 Subject: [PATCH 04/14] move Extended details related things in a separate Settings section --- .../gallery/activities/SettingsActivity.kt | 3 +- app/src/main/res/layout/activity_settings.xml | 88 +++++++++++-------- 2 files changed, 55 insertions(+), 36 deletions(-) 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 4b08f6971..bfc4875dc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -64,7 +64,8 @@ class SettingsActivity : SimpleActivity() { private fun setupSectionColors() { val adjustedPrimaryColor = getAdjustedPrimaryColor() - arrayListOf(visibility_label, videos_label, thumbnails_label, scrolling_label, fullscreen_media_label, security_label, file_operations_label).forEach { + arrayListOf(visibility_label, videos_label, thumbnails_label, scrolling_label, fullscreen_media_label, security_label, + file_operations_label, extended_details_label).forEach { it.setTextColor(adjustedPrimaryColor) } } diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 00563ba86..93654cdc0 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -497,6 +497,59 @@ + + + + + + + + + + + + - - - - - - - - Date: Sun, 28 Jan 2018 12:51:38 +0100 Subject: [PATCH 05/14] disable eager loading and set serial executor at Subsampling --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 4bbc7ef34..92135eee8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -8,6 +8,7 @@ import android.graphics.Matrix import android.graphics.drawable.ColorDrawable import android.media.ExifInterface.* import android.net.Uri +import android.os.AsyncTask import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -255,6 +256,8 @@ class PhotoFragment : ViewPagerFragment() { isQuickScaleEnabled = context.config.oneFingerZoom setImage(ImageSource.uri(medium.path)) orientation = if (orient == -1) SubsamplingScaleImageView.ORIENTATION_USE_EXIF else degreesForRotation(orient) + setEagerLoadingEnabled(false) + setExecutor(AsyncTask.SERIAL_EXECUTOR) setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener { override fun onImageLoaded() { } From c16a8f6ad67def80259316069f1690db66d5a18d Mon Sep 17 00:00:00 2001 From: FTno <16176811+FTno@users.noreply.github.com> Date: Sun, 28 Jan 2018 16:18:16 +0100 Subject: [PATCH 06/14] Update strings.xml Norwegian translation update --- app/src/main/res/values-nb/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 761fa1a36..342bb2f27 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -132,14 +132,14 @@ Vis flere detaljer i mediavisningen Velg detaljer Tillat en-finger-zoom i mediavisningen - Tillat å skifte media øyeblikkelig ved å klikke på kanten av skjermen - Replace deep zoomable images with better quality ones - Hide extended details when status bar is hidden + Tillat å skifte media øyeblikkelig ved å trykke på kanten av skjermen + Erstatt dyp-zoombare bilder med bilder av bedre kvalitet + Skjul utvidede detaljer når statuslinjen er skjult Minibilder Mediavisning - Extended details + Utvidede detaljer From d36ce4ab8d585da02c8f0fcbb3e419918c9d5255 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 16:20:15 +0100 Subject: [PATCH 07/14] fix target resolution of fullscreen media in case the image is rotated --- .../gallery/fragments/PhotoFragment.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 92135eee8..603cc8546 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -194,8 +194,14 @@ class PhotoFragment : ViewPagerFragment() { private fun loadBitmap(degrees: Float = 0f) { if (degrees == 0f) { - val targetWidth = if (ViewPagerActivity.screenWidth == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenWidth - val targetHeight = if (ViewPagerActivity.screenHeight == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenHeight + var targetWidth = if (ViewPagerActivity.screenWidth == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenWidth + var targetHeight = if (ViewPagerActivity.screenHeight == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenHeight + val exif = android.media.ExifInterface(medium.path) + val orientation = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, -1) + if (orientation == ORIENTATION_ROTATE_90) { + targetWidth = targetHeight + targetHeight = Target.SIZE_ORIGINAL + } val options = RequestOptions() .signature(medium.path.getFileSignature()) @@ -231,7 +237,7 @@ class PhotoFragment : ViewPagerFragment() { } private fun addZoomableView() { - if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.isGone() && !medium.isDng()) { + if (medium.isImage() && isFragmentVisible && view.subsampling_view.isGone() && !medium.isDng()) { val defaultOrientation = -1 var orient = defaultOrientation From b824023722537a37bf16765b5bfe6a7a83535225 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 16:39:12 +0100 Subject: [PATCH 08/14] add a toggle for replacing zoomable images with better quality ones, related to #343 --- .../gallery/activities/SettingsActivity.kt | 9 ++++ .../gallery/activities/ViewPagerActivity.kt | 24 ++++++--- .../gallery/fragments/PhotoFragment.kt | 51 ++++++++++--------- .../gallery/helpers/Config.kt | 4 ++ .../gallery/helpers/Constants.kt | 1 + app/src/main/res/layout/activity_settings.xml | 20 ++++++++ 6 files changed, 78 insertions(+), 31 deletions(-) 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 bfc4875dc..f3aeeb21e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -56,6 +56,7 @@ class SettingsActivity : SimpleActivity() { setupShowInfoBubble() setupOneFingerZoom() setupAllowInstantChange() + setupReplaceZoomableImages() setupShowExtendedDetails() setupManageExtendedDetails() updateTextColors(settings_holder) @@ -296,6 +297,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupReplaceZoomableImages() { + settings_replace_zoomable_images.isChecked = config.replaceZoomableImages + settings_replace_zoomable_images_holder.setOnClickListener { + settings_replace_zoomable_images.toggle() + config.replaceZoomableImages = settings_replace_zoomable_images.isChecked + } + } + private fun setupShowExtendedDetails() { settings_show_extended_details.isChecked = config.showExtendedDetails settings_show_extended_details_holder.setOnClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 26104988a..f9a813d6d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -68,6 +68,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private var mIsOrientationLocked = false private var mStoredUseEnglish = false + private var mStoredReplaceZoomableImages = false private var mMediaFiles = ArrayList() companion object { @@ -106,6 +107,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View return } + if (mStoredReplaceZoomableImages != config.replaceZoomableImages) { + mPrevHashcode = 0 + refreshViewPager() + } + supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background)) if (config.maxBrightness) { @@ -204,7 +210,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } } - reloadViewPager() + refreshViewPager() scanPath(mPath) if (config.blackBackground) { @@ -291,7 +297,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun storeStateVariables() { - mStoredUseEnglish = config.useEnglish + config.apply { + mStoredUseEnglish = useEnglish + mStoredReplaceZoomableImages = replaceZoomableImages + } } private fun updatePagerItems(media: MutableList) { @@ -456,7 +465,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View tryCopyMoveFilesTo(files, isCopyOperation) { config.tempFolderPath = "" if (!isCopyOperation) { - reloadViewPager() + refreshViewPager() } } } @@ -605,8 +614,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun isShowHiddenFlagNeeded(): Boolean { val file = File(mPath) - if (file.isHidden) + if (file.isHidden) { return true + } var parent = file.parentFile ?: return false while (true) { @@ -692,7 +702,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View if (requestCode == REQUEST_EDIT_IMAGE) { if (resultCode == Activity.RESULT_OK && resultData != null) { mPos = -1 - reloadViewPager() + refreshViewPager() } } else if (requestCode == REQUEST_SET_AS) { if (resultCode == Activity.RESULT_OK) { @@ -719,7 +729,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun deleteConfirmed() { deleteFile(File(getCurrentMedia()[mPos].path)) { - reloadViewPager() + refreshViewPager() } } @@ -758,7 +768,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } } - private fun reloadViewPager() { + private fun refreshViewPager() { GetMediaAsynctask(applicationContext, mDirectory, false, false, mShowAll) { gotMedia(it) }.execute() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 603cc8546..d6934cf78 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -44,6 +44,7 @@ class PhotoFragment : ViewPagerFragment() { private var wasInit = false private var storedShowExtendedDetails = false private var storedExtendedDetails = 0 + private var imageOrientation = -1 private var gifDrawable: GifDrawable? = null lateinit var view: ViewGroup @@ -163,6 +164,7 @@ class PhotoFragment : ViewPagerFragment() { } private fun loadImage() { + imageOrientation = getImageOrientation() if (medium.isGif()) { loadGif() } else { @@ -196,9 +198,7 @@ class PhotoFragment : ViewPagerFragment() { if (degrees == 0f) { var targetWidth = if (ViewPagerActivity.screenWidth == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenWidth var targetHeight = if (ViewPagerActivity.screenHeight == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenHeight - val exif = android.media.ExifInterface(medium.path) - val orientation = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, -1) - if (orientation == ORIENTATION_ROTATE_90) { + if (imageOrientation == ORIENTATION_ROTATE_90) { targetWidth = targetHeight targetHeight = Target.SIZE_ORIGINAL } @@ -237,31 +237,14 @@ class PhotoFragment : ViewPagerFragment() { } private fun addZoomableView() { - if (medium.isImage() && isFragmentVisible && view.subsampling_view.isGone() && !medium.isDng()) { - val defaultOrientation = -1 - var orient = defaultOrientation - - try { - val exif = android.media.ExifInterface(medium.path) - orient = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, defaultOrientation) - - if (orient == defaultOrientation) { - val uri = if (medium.path.startsWith("content:/")) Uri.parse(medium.path) else Uri.fromFile(File(medium.path)) - val inputStream = context!!.contentResolver.openInputStream(uri) - val exif2 = ExifInterface() - exif2.readExif(inputStream, ExifInterface.Options.OPTION_ALL) - orient = exif2.getTag(ExifInterface.TAG_ORIENTATION)?.getValueAsInt(defaultOrientation) ?: defaultOrientation - } - } catch (ignored: Exception) { - } - + if (!context!!.config.replaceZoomableImages && medium.isImage() && isFragmentVisible && view.subsampling_view.isGone() && !medium.isDng()) { ViewPagerActivity.wasDecodedByGlide = false view.subsampling_view.apply { maxScale = 10f beVisible() isQuickScaleEnabled = context.config.oneFingerZoom setImage(ImageSource.uri(medium.path)) - orientation = if (orient == -1) SubsamplingScaleImageView.ORIENTATION_USE_EXIF else degreesForRotation(orient) + orientation = if (imageOrientation == -1) SubsamplingScaleImageView.ORIENTATION_USE_EXIF else degreesForRotation(imageOrientation) setEagerLoadingEnabled(false) setExecutor(AsyncTask.SERIAL_EXECUTOR) setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener { @@ -270,8 +253,8 @@ class PhotoFragment : ViewPagerFragment() { override fun onReady() { background = ColorDrawable(if (context.config.blackBackground) Color.BLACK else context.config.backgroundColor) - val useWidth = if (orient == ORIENTATION_ROTATE_90 || orient == ORIENTATION_ROTATE_270) sHeight else sWidth - val useHeight = if (orient == ORIENTATION_ROTATE_90 || orient == ORIENTATION_ROTATE_270) sWidth else sHeight + val useWidth = if (imageOrientation == ORIENTATION_ROTATE_90 || imageOrientation == ORIENTATION_ROTATE_270) sHeight else sWidth + val useHeight = if (imageOrientation == ORIENTATION_ROTATE_90 || imageOrientation == ORIENTATION_ROTATE_270) sWidth else sHeight setDoubleTapZoomScale(getDoubleTapZoomScale(useWidth, useHeight)) } @@ -295,6 +278,26 @@ class PhotoFragment : ViewPagerFragment() { } } + private fun getImageOrientation(): Int { + val defaultOrientation = -1 + var orient = defaultOrientation + + try { + val exif = android.media.ExifInterface(medium.path) + orient = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, defaultOrientation) + + if (orient == defaultOrientation) { + val uri = if (medium.path.startsWith("content:/")) Uri.parse(medium.path) else Uri.fromFile(File(medium.path)) + val inputStream = context!!.contentResolver.openInputStream(uri) + val exif2 = ExifInterface() + exif2.readExif(inputStream, ExifInterface.Options.OPTION_ALL) + orient = exif2.getTag(ExifInterface.TAG_ORIENTATION)?.getValueAsInt(defaultOrientation) ?: defaultOrientation + } + } catch (ignored: Exception) { + } + return orient + } + private fun getDoubleTapZoomScale(width: Int, height: Int): Float { val bitmapAspectRatio = height / width.toFloat() val screenAspectRatio = ViewPagerActivity.screenHeight / ViewPagerActivity.screenWidth.toFloat() 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 e76e02c38..743cae29e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -176,6 +176,10 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(ALLOW_INSTANT_CHANGE, false) set(allowInstantChange) = prefs.edit().putBoolean(ALLOW_INSTANT_CHANGE, allowInstantChange).apply() + var replaceZoomableImages: Boolean + get() = prefs.getBoolean(REPLACE_ZOOMABLE_IMAGES, false) + set(replaceZoomableImages) = prefs.edit().putBoolean(REPLACE_ZOOMABLE_IMAGES, replaceZoomableImages).apply() + private fun getDirectoryColumnsField(): String { val isPortrait = context.resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT return if (isPortrait) { 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 1ef5d45b1..1a8dbb70e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -45,6 +45,7 @@ val EXTENDED_DETAILS = "extended_details" val LAST_FILE_CLEANUP = "last_file_cleanup" val ONE_FINGER_ZOOM = "one_finger_zoom" val ALLOW_INSTANT_CHANGE = "allow_instant_change" +val REPLACE_ZOOMABLE_IMAGES = "replace_zoomable_images" // 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 93654cdc0..a27c81258 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -497,6 +497,26 @@ + + + + + + Date: Sun, 28 Jan 2018 16:49:05 +0100 Subject: [PATCH 09/14] add "const" modifier to some values --- .../gallery/helpers/Constants.kt | 182 +++++++++--------- 1 file changed, 89 insertions(+), 93 deletions(-) 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 1a8dbb70e..f278a6398 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -1,110 +1,106 @@ package com.simplemobiletools.gallery.helpers // shared preferences -val SORT_ORDER = "sort_order" -val DIRECTORY_SORT_ORDER = "directory_sort_order" -val SORT_FOLDER_PREFIX = "sort_folder_" -val SHOW_HIDDEN_MEDIA = "show_hidden_media" -val TEMPORARILY_SHOW_HIDDEN = "temporarily_show_hidden" -val IS_THIRD_PARTY_INTENT = "is_third_party_intent" -val AUTOPLAY_VIDEOS = "autoplay_videos" -val LOOP_VIDEOS = "loop_videos" -val ANIMATE_GIFS = "animate_gifs" -val MAX_BRIGHTNESS = "max_brightness" -val CROP_THUMBNAILS = "crop_thumbnails" -val SCREEN_ROTATION = "screen_rotation" -val DISPLAY_FILE_NAMES = "display_file_names" -val DARK_BACKGROUND = "dark_background" -val PINNED_FOLDERS = "pinned_folders" -val FILTER_MEDIA = "filter_media" -val DIR_COLUMN_CNT = "dir_column_cnt" -val DIR_LANDSCAPE_COLUMN_CNT = "dir_landscape_column_cnt" -val DIR_HORIZONTAL_COLUMN_CNT = "dir_horizontal_column_cnt" -val DIR_LANDSCAPE_HORIZONTAL_COLUMN_CNT = "dir_landscape_horizontal_column_cnt" -val MEDIA_COLUMN_CNT = "media_column_cnt" -val MEDIA_LANDSCAPE_COLUMN_CNT = "media_landscape_column_cnt" -val MEDIA_HORIZONTAL_COLUMN_CNT = "media_horizontal_column_cnt" -val MEDIA_LANDSCAPE_HORIZONTAL_COLUMN_CNT = "media_landscape_horizontal_column_cnt" -val SHOW_ALL = "show_all" // display images and videos from all folders together -val SAVE_FOLDER_PREFIX = "folder2_" -val HIDE_FOLDER_TOOLTIP_SHOWN = "hide_folder_tooltip_shown" -val EXCLUDED_FOLDERS = "excluded_folders" -val INCLUDED_FOLDERS = "included_folders" -val ALBUM_COVERS = "album_covers" -val SCROLL_HORIZONTALLY = "scroll_horizontally" -val HIDE_SYSTEM_UI = "hide_system_ui" -val REPLACE_SHARE_WITH_ROTATE = "replace_share_with_rotate" -val DELETE_EMPTY_FOLDERS = "delete_empty_folders" -val ALLOW_VIDEO_GESTURES = "allow_video_gestures" -val SHOW_MEDIA_COUNT = "show_media_count" -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" -val EXTENDED_DETAILS = "extended_details" -val LAST_FILE_CLEANUP = "last_file_cleanup" -val ONE_FINGER_ZOOM = "one_finger_zoom" -val ALLOW_INSTANT_CHANGE = "allow_instant_change" -val REPLACE_ZOOMABLE_IMAGES = "replace_zoomable_images" +const val SORT_ORDER = "sort_order" +const val DIRECTORY_SORT_ORDER = "directory_sort_order" +const val SORT_FOLDER_PREFIX = "sort_folder_" +const val SHOW_HIDDEN_MEDIA = "show_hidden_media" +const val TEMPORARILY_SHOW_HIDDEN = "temporarily_show_hidden" +const val IS_THIRD_PARTY_INTENT = "is_third_party_intent" +const val AUTOPLAY_VIDEOS = "autoplay_videos" +const val LOOP_VIDEOS = "loop_videos" +const val ANIMATE_GIFS = "animate_gifs" +const val MAX_BRIGHTNESS = "max_brightness" +const val CROP_THUMBNAILS = "crop_thumbnails" +const val SCREEN_ROTATION = "screen_rotation" +const val DISPLAY_FILE_NAMES = "display_file_names" +const val DARK_BACKGROUND = "dark_background" +const val PINNED_FOLDERS = "pinned_folders" +const val FILTER_MEDIA = "filter_media" +const val DIR_COLUMN_CNT = "dir_column_cnt" +const val DIR_LANDSCAPE_COLUMN_CNT = "dir_landscape_column_cnt" +const val DIR_HORIZONTAL_COLUMN_CNT = "dir_horizontal_column_cnt" +const val DIR_LANDSCAPE_HORIZONTAL_COLUMN_CNT = "dir_landscape_horizontal_column_cnt" +const val MEDIA_COLUMN_CNT = "media_column_cnt" +const val MEDIA_LANDSCAPE_COLUMN_CNT = "media_landscape_column_cnt" +const val MEDIA_HORIZONTAL_COLUMN_CNT = "media_horizontal_column_cnt" +const val MEDIA_LANDSCAPE_HORIZONTAL_COLUMN_CNT = "media_landscape_horizontal_column_cnt" +const val SHOW_ALL = "show_all" // display images and videos from all folders together +const val SAVE_FOLDER_PREFIX = "folder2_" +const val HIDE_FOLDER_TOOLTIP_SHOWN = "hide_folder_tooltip_shown" +const val EXCLUDED_FOLDERS = "excluded_folders" +const val INCLUDED_FOLDERS = "included_folders" +const val ALBUM_COVERS = "album_covers" +const val SCROLL_HORIZONTALLY = "scroll_horizontally" +const val HIDE_SYSTEM_UI = "hide_system_ui" +const val REPLACE_SHARE_WITH_ROTATE = "replace_share_with_rotate" +const val DELETE_EMPTY_FOLDERS = "delete_empty_folders" +const val ALLOW_VIDEO_GESTURES = "allow_video_gestures" +const val SHOW_MEDIA_COUNT = "show_media_count" +const val TEMP_FOLDER_PATH = "temp_folder_path" +const val VIEW_TYPE_FOLDERS = "view_type_folders" +const val VIEW_TYPE_FILES = "view_type_files" +const val SHOW_EXTENDED_DETAILS = "show_extended_details" +const val EXTENDED_DETAILS = "extended_details" +const val LAST_FILE_CLEANUP = "last_file_cleanup" +const val ONE_FINGER_ZOOM = "one_finger_zoom" +const val ALLOW_INSTANT_CHANGE = "allow_instant_change" +const val REPLACE_ZOOMABLE_IMAGES = "replace_zoomable_images" // slideshow -val SLIDESHOW_INTERVAL = "slideshow_interval" -val SLIDESHOW_INCLUDE_PHOTOS = "slideshow_include_photos" -val SLIDESHOW_INCLUDE_VIDEOS = "slideshow_include_videos" -val SLIDESHOW_INCLUDE_GIFS = "slideshow_include_gifs" -val SLIDESHOW_RANDOM_ORDER = "slideshow_random_order" -val SLIDESHOW_USE_FADE = "slideshow_use_fade" -val SLIDESHOW_MOVE_BACKWARDS = "slideshow_move_backwards" -val SLIDESHOW_LOOP = "loop_slideshow" -val SLIDESHOW_DEFAULT_INTERVAL = 5 -val SLIDESHOW_SCROLL_DURATION = 500L +const val SLIDESHOW_INTERVAL = "slideshow_interval" +const val SLIDESHOW_INCLUDE_PHOTOS = "slideshow_include_photos" +const val SLIDESHOW_INCLUDE_VIDEOS = "slideshow_include_videos" +const val SLIDESHOW_INCLUDE_GIFS = "slideshow_include_gifs" +const val SLIDESHOW_RANDOM_ORDER = "slideshow_random_order" +const val SLIDESHOW_USE_FADE = "slideshow_use_fade" +const val SLIDESHOW_MOVE_BACKWARDS = "slideshow_move_backwards" +const val SLIDESHOW_LOOP = "loop_slideshow" +const val SLIDESHOW_DEFAULT_INTERVAL = 5 +const val SLIDESHOW_SCROLL_DURATION = 500L -val NOMEDIA = ".nomedia" -val MAX_COLUMN_COUNT = 20 +const val NOMEDIA = ".nomedia" +const val MAX_COLUMN_COUNT = 20 -val DIRECTORY = "directory" -val MEDIUM = "medium" -val PATH = "path" -val GET_IMAGE_INTENT = "get_image_intent" -val GET_VIDEO_INTENT = "get_video_intent" -val GET_ANY_INTENT = "get_any_intent" -val SET_WALLPAPER_INTENT = "set_wallpaper_intent" -val DIRECTORIES = "directories2" -val IS_VIEW_INTENT = "is_view_intent" -val PICKED_PATHS = "picked_paths" +const val DIRECTORY = "directory" +const val MEDIUM = "medium" +const val PATH = "path" +const val GET_IMAGE_INTENT = "get_image_intent" +const val GET_VIDEO_INTENT = "get_video_intent" +const val GET_ANY_INTENT = "get_any_intent" +const val SET_WALLPAPER_INTENT = "set_wallpaper_intent" +const val DIRECTORIES = "directories2" +const val IS_VIEW_INTENT = "is_view_intent" +const val PICKED_PATHS = "picked_paths" // rotations -val ROTATE_BY_SYSTEM_SETTING = 0 -val ROTATE_BY_DEVICE_ROTATION = 1 -val ROTATE_BY_ASPECT_RATIO = 2 - -val ORIENT_PORTRAIT = 0 -val ORIENT_LANDSCAPE_LEFT = 1 -val ORIENT_LANDSCAPE_RIGHT = 2 +const val ROTATE_BY_SYSTEM_SETTING = 0 +const val ROTATE_BY_DEVICE_ROTATION = 1 +const val ROTATE_BY_ASPECT_RATIO = 2 // filter media -val IMAGES = 1 -val VIDEOS = 2 -val GIFS = 4 +const val IMAGES = 1 +const val VIDEOS = 2 +const val GIFS = 4 // view types -val VIEW_TYPE_GRID = 1 -val VIEW_TYPE_LIST = 2 +const val VIEW_TYPE_GRID = 1 +const val VIEW_TYPE_LIST = 2 // extended details values -val EXT_NAME = 1 -val EXT_PATH = 2 -val EXT_SIZE = 4 -val EXT_RESOLUTION = 8 -val EXT_LAST_MODIFIED = 16 -val EXT_DATE_TAKEN = 32 -val EXT_CAMERA_MODEL = 64 -val EXT_EXIF_PROPERTIES = 128 -val EXT_DURATION = 256 -val EXT_ARTIST = 512 -val EXT_ALBUM = 1024 +const val EXT_NAME = 1 +const val EXT_PATH = 2 +const val EXT_SIZE = 4 +const val EXT_RESOLUTION = 8 +const val EXT_LAST_MODIFIED = 16 +const val EXT_DATE_TAKEN = 32 +const val EXT_CAMERA_MODEL = 64 +const val EXT_EXIF_PROPERTIES = 128 +const val EXT_DURATION = 256 +const val EXT_ARTIST = 512 +const val EXT_ALBUM = 1024 // media types -val TYPE_IMAGE = 1 -val TYPE_VIDEO = 2 -val TYPE_GIF = 3 +const val TYPE_IMAGE = 1 +const val TYPE_VIDEO = 2 +const val TYPE_GIF = 3 From 4e15f047c5cad0c5c6b9aba5953d3c879551b40c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 17:29:15 +0100 Subject: [PATCH 10/14] add an extra check to avoid removing valid files --- .../com/simplemobiletools/gallery/helpers/MediaFetcher.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt index 8f5eb9dec..e0e797f0f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -43,8 +43,11 @@ class MediaFetcher(val context: Context) { Thread { val ONE_WEEK = 7 * 24 * 60 * 60 * 1000 if (System.currentTimeMillis() - context.config.lastFileCleanup > ONE_WEEK) { - media.filter { !File(it.path).exists() }.forEach { - context.deleteFromMediaStore(File(it.path)) + media.forEach { + val file = File(it.path) + if (!it.path.contains("/.thumbnails") && !file.exists() && file.length() == 0L) { + context.deleteFromMediaStore(file) + } } context.config.lastFileCleanup = System.currentTimeMillis() } From c4c083b77f75a6c7abac4c1f0e97c71de34ea430 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 17:49:29 +0100 Subject: [PATCH 11/14] add a toggle for hiding extended details when the statusbar is hidden --- .../gallery/activities/SettingsActivity.kt | 11 ++++++++ .../gallery/fragments/PhotoFragment.kt | 25 +++++++++++++++---- .../gallery/fragments/VideoFragment.kt | 25 +++++++++++++++---- .../gallery/helpers/Config.kt | 4 +++ .../gallery/helpers/Constants.kt | 1 + app/src/main/res/layout/activity_settings.xml | 19 ++++++++++++++ 6 files changed, 75 insertions(+), 10 deletions(-) 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 f3aeeb21e..0e75cdddd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -58,6 +58,7 @@ class SettingsActivity : SimpleActivity() { setupAllowInstantChange() setupReplaceZoomableImages() setupShowExtendedDetails() + setupHideExtendedDetails() setupManageExtendedDetails() updateTextColors(settings_holder) setupSectionColors() @@ -311,6 +312,16 @@ class SettingsActivity : SimpleActivity() { settings_show_extended_details.toggle() config.showExtendedDetails = settings_show_extended_details.isChecked settings_manage_extended_details_holder.beVisibleIf(config.showExtendedDetails) + settings_hide_extended_details_holder.beVisibleIf(config.showExtendedDetails) + } + } + + private fun setupHideExtendedDetails() { + settings_hide_extended_details_holder.beVisibleIf(config.showExtendedDetails) + settings_hide_extended_details.isChecked = config.hideExtendedDetails + settings_hide_extended_details_holder.setOnClickListener { + settings_hide_extended_details.toggle() + config.hideExtendedDetails = settings_hide_extended_details.isChecked } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index d6934cf78..1cb1d5e23 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -42,11 +42,13 @@ class PhotoFragment : ViewPagerFragment() { private var isFragmentVisible = false private var isFullscreen = false private var wasInit = false - private var storedShowExtendedDetails = false - private var storedExtendedDetails = 0 private var imageOrientation = -1 private var gifDrawable: GifDrawable? = null + private var storedShowExtendedDetails = false + private var storedHideExtendedDetails = false + private var storedExtendedDetails = 0 + lateinit var view: ViewGroup lateinit var medium: Medium @@ -58,6 +60,7 @@ class PhotoFragment : ViewPagerFragment() { instant_next_item.setOnClickListener { listener?.goToNextItem() } } + storeStateVariables() if (!isFragmentVisible && activity is PhotoActivity) { isFragmentVisible = true } @@ -104,8 +107,7 @@ class PhotoFragment : ViewPagerFragment() { override fun onPause() { super.onPause() - storedShowExtendedDetails = context!!.config.showExtendedDetails - storedExtendedDetails = context!!.config.extendedDetails + storeStateVariables() } override fun onResume() { @@ -117,6 +119,7 @@ class PhotoFragment : ViewPagerFragment() { val allowInstantChange = context!!.config.allowInstantChange view.instant_prev_item.beVisibleIf(allowInstantChange) view.instant_next_item.beVisibleIf(allowInstantChange) + storeStateVariables() } override fun setMenuVisibility(menuVisible: Boolean) { @@ -131,6 +134,14 @@ class PhotoFragment : ViewPagerFragment() { } } + private fun storeStateVariables() { + context!!.config.apply { + storedShowExtendedDetails = showExtendedDetails + storedHideExtendedDetails = hideExtendedDetails + storedExtendedDetails = extendedDetails + } + } + private fun gifFragmentVisibilityChanged(isVisible: Boolean) { if (isVisible) { gifDrawable?.start() @@ -362,8 +373,12 @@ class PhotoFragment : ViewPagerFragment() { override fun fullscreenToggled(isFullscreen: Boolean) { this.isFullscreen = isFullscreen view.photo_details.apply { - if (isVisible()) { + if (storedShowExtendedDetails) { animate().y(getExtendedDetailsY(height)) + + if (storedHideExtendedDetails) { + animate().alpha(if (isFullscreen) 0f else 1f).start() + } } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index 8b3099e43..0ee831121 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -43,11 +43,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee private var mIsFullscreen = false private var mIsFragmentVisible = false private var mPlayOnPrepare = false - private var mStoredShowExtendedDetails = false private var wasEncoded = false private var wasInit = false private var isPrepared = false - private var mStoredExtendedDetails = 0 private var mCurrTime = 0 private var mDuration = 0 private var mEncodedPath = "" @@ -63,6 +61,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee private var mSlideInfoText = "" private var mSlideInfoFadeHandler = Handler() + private var mStoredShowExtendedDetails = false + private var mStoredHideExtendedDetails = false + private var mStoredExtendedDetails = 0 + lateinit var medium: Medium override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { @@ -72,6 +74,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee mTimeHolder = video_time_holder } + storeStateVariables() medium = arguments!!.getSerializable(MEDIUM) as Medium // setMenuVisibility is not called at VideoActivity (third party intent) @@ -107,13 +110,13 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee if (context!!.config.showExtendedDetails != mStoredShowExtendedDetails || context!!.config.extendedDetails != mStoredExtendedDetails) { checkExtendedDetails() } + storeStateVariables() } override fun onPause() { super.onPause() pauseVideo() - mStoredShowExtendedDetails = context!!.config.showExtendedDetails - mStoredExtendedDetails = context!!.config.extendedDetails + storeStateVariables() } override fun onDestroy() { @@ -123,6 +126,14 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee } } + private fun storeStateVariables() { + context!!.config.apply { + mStoredShowExtendedDetails = showExtendedDetails + mStoredHideExtendedDetails = hideExtendedDetails + mStoredExtendedDetails = extendedDetails + } + } + private fun setupPlayer() { if (activity == null) return @@ -614,8 +625,12 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee mIsFullscreen = isFullscreen checkFullscreen() mView!!.video_details.apply { - if (isVisible()) { + if (mStoredShowExtendedDetails) { animate().y(getExtendedDetailsY(height)) + + if (mStoredHideExtendedDetails) { + animate().alpha(if (isFullscreen) 0f else 1f).start() + } } } } 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 743cae29e..5002bf781 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -309,6 +309,10 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(SHOW_EXTENDED_DETAILS, false) set(showExtendedDetails) = prefs.edit().putBoolean(SHOW_EXTENDED_DETAILS, showExtendedDetails).apply() + var hideExtendedDetails: Boolean + get() = prefs.getBoolean(HIDE_EXTENDED_DETAILS, false) + set(hideExtendedDetails) = prefs.edit().putBoolean(HIDE_EXTENDED_DETAILS, hideExtendedDetails).apply() + var extendedDetails: Int get() = prefs.getInt(EXTENDED_DETAILS, EXT_RESOLUTION or EXT_LAST_MODIFIED or EXT_EXIF_PROPERTIES) set(extendedDetails) = prefs.edit().putInt(EXTENDED_DETAILS, extendedDetails).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 f278a6398..821d9f1e8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -42,6 +42,7 @@ const val VIEW_TYPE_FOLDERS = "view_type_folders" const val VIEW_TYPE_FILES = "view_type_files" const val SHOW_EXTENDED_DETAILS = "show_extended_details" const val EXTENDED_DETAILS = "extended_details" +const val HIDE_EXTENDED_DETAILS = "hide_extended_details" const val LAST_FILE_CLEANUP = "last_file_cleanup" const val ONE_FINGER_ZOOM = "one_finger_zoom" const val ALLOW_INSTANT_CHANGE = "allow_instant_change" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index a27c81258..6558a9fb1 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -589,6 +589,25 @@ android:text="@string/show_extended_details"/> + + + + + Date: Sun, 28 Jan 2018 20:31:27 +0300 Subject: [PATCH 12/14] Update strings.xml --- app/src/main/res/values-ru/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2493e295b..69b3df690 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -133,13 +133,13 @@ Выбрать подробности файла Масштабирование одним пальцем в полноэкранном режиме Мгновенное переключение медиафайлов нажатием по краю экрана - Replace deep zoomable images with better quality ones - Hide extended details when status bar is hidden + Заменить масштабируемые изображения высококачественными + Не показывать подробности, если скрыта строка состояния Миниатюры Полноэкранное отображение медиафайлов - Extended details + Подробности From efdb646a5ed78d78fa1a2502cf3110361bdd916e Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 21:04:42 +0100 Subject: [PATCH 13/14] update commons to 3.8.12 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 205e7ff6a..19eb2c665 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,7 +43,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.8.11' + implementation 'com.simplemobiletools:commons:3.8.12' implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0' implementation 'com.android.support:multidex:1.0.2' implementation 'com.google.code.gson:gson:2.8.2' From c3a7068806311eb4bb34625e1f8b94f488e1c7cc Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 21:15:36 +0100 Subject: [PATCH 14/14] store only 80 media files in shared prefs and catch OOMs --- .../gallery/activities/MainActivity.kt | 3 ++- .../gallery/activities/MediaActivity.kt | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 82d85fffd..6bb06015e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -239,8 +239,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } private fun getDirectories() { - if (mIsGettingDirs) + if (mIsGettingDirs) { return + } mIsGettingDirs = true val dirs = getCachedDirectories() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index e9b36642f..0be1d39e6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -42,7 +42,7 @@ import java.io.File import java.io.IOException class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { - private val SAVE_MEDIA_CNT = 100 + private val SAVE_MEDIA_CNT = 80 private val LAST_MEDIA_CHECK_PERIOD = 3000L private var mPath = "" @@ -611,9 +611,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private fun storeFolder() { if (!config.temporarilyShowHidden) { - val subList = mMedia.subList(0, Math.min(SAVE_MEDIA_CNT, mMedia.size)) - val json = Gson().toJson(subList) - config.saveFolderMedia(mPath, json) + Thread { + try { + val subList = mMedia.subList(0, Math.min(SAVE_MEDIA_CNT, mMedia.size)) + val json = Gson().toJson(subList) + config.saveFolderMedia(mPath, json) + } catch (ignored: OutOfMemoryError) { + } + }.start() } }