From d5325f5ea33c25c86d18167f28b24823637d35d7 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 23 Oct 2018 15:03:15 +0200 Subject: [PATCH 01/11] Dutch --- app/src/main/res/values-nl/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 46790ef4a..a6b0b62da 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -146,8 +146,8 @@ Horizontaal scrollen Statusbalk automatisch verbergen in volledig scherm Lege mappen verwijderen na leegmaken - Helderheid voor afbeeldingen aanpassen met verticale gebaren - Volume en helderheid voor video\'s aanpassen met verticale gebaren + Helderheid voor afbeeldingen aanpassen met verticale veeggebaren + Volume en helderheid voor video\'s aanpassen met verticale veeggebaren Aantallen in mappen tonen Menu-item Draaien vastzetten in volledig scherm (in plaats van Delen) Uitgebreide informatie tonen in volledig scherm @@ -162,7 +162,7 @@ Afbeeldingen ver inzoomen Afbeeldingen in de hoogst mogelijke kwaliteit weergeven Prullenbak als laatste item tonen - Allow closing the fullscreen view with a down gesture + Naar beneden vegen om volledig scherm af te sluiten Miniatuurvoorbeelden From 21e032f86c6a1cf5af45cefc4ee74651836b0e27 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Oct 2018 15:06:31 +0200 Subject: [PATCH 02/11] update commons to 5.2.1 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index cfa9e8587..6b7f1b2b0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -48,7 +48,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.2.0' + implementation 'com.simplemobiletools:commons:5.2.1' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'androidx.multidex:multidex:2.0.0' implementation 'it.sephiroth.android.exif:library:1.0.1' From 13d18411450ab4919d0e8df0cd836a31c85a7790 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Oct 2018 15:17:41 +0200 Subject: [PATCH 03/11] update version to 5.1.1 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6b7f1b2b0..7badf85fd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.simplemobiletools.gallery" minSdkVersion 21 targetSdkVersion 28 - versionCode 204 - versionName "5.1.0" + versionCode 205 + versionName "5.1.1" multiDexEnabled true setProperty("archivesBaseName", "gallery") } From 17d75bf55522525a7c0bec3be5899d503d61f104 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Oct 2018 15:17:48 +0200 Subject: [PATCH 04/11] updating changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d65d24356..a4f494494 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========== +Version 5.1.1 *(2018-10-23)* +---------------------------- + + * Fixing the inability to delete SD card files + Version 5.1.0 *(2018-10-23)* ---------------------------- From 9d4be149bfe6d5eb563c3f5e621f0c16784cad6f Mon Sep 17 00:00:00 2001 From: Emanuele Petriglia Date: Tue, 23 Oct 2018 18:33:09 +0000 Subject: [PATCH 05/11] Update italian translation --- app/src/main/res/values-it/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 5483a5f27..bc230b8a9 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -162,7 +162,7 @@ Immagini ingrandibili a fondo Mostra le immagini alla massima qualità possibile Mostra il cestino come ultimo elemento nella schermata principale - Allow closing the fullscreen view with a down gesture + Chiudi la visuale a schermo intero con un gesto verso il basso Miniature From 127f8115a8b99082e89cff938d50d8b11ab3a87a Mon Sep 17 00:00:00 2001 From: Pzqqt <821026875@qq.com> Date: Thu, 25 Oct 2018 13:13:52 +0800 Subject: [PATCH 06/11] Update strings.xml --- app/src/main/res/values-zh-rCN/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 0e5981b3a..a4ddc43bf 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -142,7 +142,7 @@ 系统设置 设备方向 根据长宽比 - 全屏时使用黑色背景和状态栏​ + 全屏时使用黑色背景和状态栏 水平滚动缩略图 全屏时自动隐藏状态栏 删除没有内容的空文件夹 @@ -162,7 +162,7 @@ 深度放大图像 以最高质量显示图像 在主屏幕界面的最后一项显示回收站 - Allow closing the fullscreen view with a down gesture + 使用下滑手势关闭全屏视图 缩略图 From f74f9f4a031bb783aa8f6a21a4c872e0fc58c962 Mon Sep 17 00:00:00 2001 From: Pa3kSB Date: Thu, 25 Oct 2018 08:31:02 +0200 Subject: [PATCH 07/11] Added random sort option --- .../gallery/dialogs/ChangeSortingDialog.kt | 3 +++ .../com/simplemobiletools/gallery/extensions/Context.kt | 5 +++++ .../com/simplemobiletools/gallery/helpers/Constants.kt | 3 +++ .../com/simplemobiletools/gallery/helpers/MediaFetcher.kt | 7 ++++++- app/src/main/res/layout/dialog_change_sorting.xml | 8 ++++++++ app/src/main/res/values-sk/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 7 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt index 991d93e40..da162cfef 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt @@ -10,6 +10,7 @@ import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.helpers.SHOW_ALL +import com.simplemobiletools.gallery.helpers.SORT_BY_RANDOM import kotlinx.android.synthetic.main.dialog_change_sorting.view.* class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorting: Boolean, showFolderCheckbox: Boolean, @@ -47,6 +48,7 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorti currSorting and SORT_BY_SIZE != 0 -> sortingRadio.sorting_dialog_radio_size currSorting and SORT_BY_DATE_MODIFIED != 0 -> sortingRadio.sorting_dialog_radio_last_modified currSorting and SORT_BY_DATE_TAKEN != 0 -> sortingRadio.sorting_dialog_radio_date_taken + currSorting and SORT_BY_RANDOM != 0 -> sortingRadio.sorting_dialog_radio_random else -> sortingRadio.sorting_dialog_radio_name } sortBtn.isChecked = true @@ -69,6 +71,7 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorti R.id.sorting_dialog_radio_path -> SORT_BY_PATH R.id.sorting_dialog_radio_size -> SORT_BY_SIZE R.id.sorting_dialog_radio_last_modified -> SORT_BY_DATE_MODIFIED + R.id.sorting_dialog_radio_random -> SORT_BY_RANDOM else -> SORT_BY_DATE_TAKEN } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt index a00548a84..b28041829 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -139,6 +139,11 @@ fun Context.getSortedDirectories(source: ArrayList): ArrayList + if (sorting and SORT_BY_RANDOM != 0) { + dirs.shuffle() + return movePinnedDirectoriesToFront(dirs) + } + dirs.sortWith(Comparator { o1, o2 -> o1 as Directory o2 as Directory 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 8c0c7b15d..edff3b94d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -153,3 +153,6 @@ const val BOTTOM_ACTION_RENAME = 1024 const val BOTTOM_ACTION_SET_AS = 2048 const val DEFAULT_BOTTOM_ACTIONS = BOTTOM_ACTION_TOGGLE_FAVORITE or BOTTOM_ACTION_EDIT or BOTTOM_ACTION_SHARE or BOTTOM_ACTION_DELETE + +// sorting +const val SORT_BY_RANDOM = 16384 \ No newline at end of file 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 7b7a08997..6312293bd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -343,7 +343,12 @@ class MediaFetcher(val context: Context) { return dateTakens } - fun sortMedia(media: ArrayList, sorting: Int) { + fun sortMedia (media: ArrayList, sorting: Int) { + if (sorting and SORT_BY_RANDOM != 0) { + media.shuffle() + return + } + media.sortWith(Comparator { o1, o2 -> o1 as Medium o2 as Medium diff --git a/app/src/main/res/layout/dialog_change_sorting.xml b/app/src/main/res/layout/dialog_change_sorting.xml index e0e642acc..1b2be9ebc 100644 --- a/app/src/main/res/layout/dialog_change_sorting.xml +++ b/app/src/main/res/layout/dialog_change_sorting.xml @@ -60,6 +60,14 @@ android:paddingTop="@dimen/medium_margin" android:text="@string/date_taken"/> + + + Náhodne