From a6b4ab34eda401ed49d51f390b4eae8ab64ed7e2 Mon Sep 17 00:00:00 2001 From: Nikola Trubitsyn Date: Thu, 28 Dec 2017 01:13:18 +0300 Subject: [PATCH 01/28] Improve Russian translation --- 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 cf810b51b..1a6e4bff4 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -82,7 +82,7 @@ Простые обои Установить в качестве обоев - Установить не удалось + Не удалось установить Установить в качестве обоев в: Приложение не найдено Установка обоев… @@ -101,8 +101,8 @@ Включать GIF Случайный порядок Эффект затухания - В обратном направлении - Закольцевать + В обратном порядке + Зациклить Слайдшоу завершилось Никаких медиафайлов для слайдшоу не было найдено. From cafc8038e9d925df5d8d4444ab64450abc9809fa Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Fri, 29 Dec 2017 13:02:30 +0100 Subject: [PATCH 02/28] =?UTF-8?q?actualiza=20d=C3=BAas=20li=C3=B1as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit two new lines translates --- app/src/main/res/values-gl/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 0f50fe1a7..6219ba6cd 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -40,11 +40,11 @@ Cartafoles excluídos Xestionar cartafoles excluídos Esto ocultará a selección xunto cos seus subcartafoles son en Simple Gallery. Pode xestionar os cartafoles ocultos en Axustes. - \?Excluír o cartafol fai no seu lugar? + Excluír o cartafol pai no seu lugar? Excluír un cartafol xunto cos subcartafoles só terá efecto en Simple Gallery, seguirán sendo visibles en outros aplicativos.\n\nSi tamén quere excluílos en outros aplicativos, utilice a opción Agochar. Eliminar todos Eliminar todos os cartafoles da lista de excluídos? Esto non borrará os cartafoles. - Manage hidden folders + Xestionar cartafoles ocultos Cartafoles incluídos @@ -122,7 +122,7 @@ Axuste do sistema Rotación do dispositivo Relación de aspecto - Black background and status bar at fullscreen media + Fondo negro e barra de estado en reprodución a pantalla completa Desplazar iconas horizontalmente Agochar controis do sistema cando visualice a pantalla completa Borrar cartafoles baldeiros cando elmine o seu contido From da80d246060cd35c2a73251d0ec3b7e7f7d0ef96 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 15:28:33 +0100 Subject: [PATCH 03/28] do not check every file existence at fetching, just once a week do a cleanup --- app/build.gradle | 2 +- .../com/simplemobiletools/gallery/helpers/Config.kt | 4 ++++ .../simplemobiletools/gallery/helpers/Constants.kt | 1 + .../gallery/helpers/MediaFetcher.kt | 13 ++++++++++--- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cd09b01ca..ba11cf9e6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.4.2' + implementation 'com.simplemobiletools:commons:3.4.15' implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0' implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0' implementation 'com.android.support:multidex:1.0.2' 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 8c2f7cdb1..9b27f1346 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -300,4 +300,8 @@ class Config(context: Context) : BaseConfig(context) { 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() + + var lastFileCleanup: Long + get() = prefs.getLong(LAST_FILE_CLEANUP, 0L) + set(lastFileCleanup) = prefs.edit().putLong(LAST_FILE_CLEANUP, lastFileCleanup).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 b9ebd1071..7318c6d9e 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 @@ 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" // slideshow val SLIDESHOW_INTERVAL = "slideshow_interval" 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 efad5c169..e0e199df2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -40,6 +40,16 @@ class MediaFetcher(val context: Context) { directories.remove(it) } + 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)) + } + context.config.lastFileCleanup = System.currentTimeMillis() + } + }.start() + return directories } @@ -140,9 +150,6 @@ class MediaFetcher(val context: Context) { if (size <= 0L) continue - if (!file.exists()) - continue - val dateTaken = cur.getLongValue(MediaStore.Images.Media.DATE_TAKEN) val dateModified = cur.getIntValue(MediaStore.Images.Media.DATE_MODIFIED) * 1000L From d353f02a517abd8a2e2bdcaee530e6da1c53a2be Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 15:46:15 +0100 Subject: [PATCH 04/28] recycle the subsampling imageview on destroy --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 1 + 1 file changed, 1 insertion(+) 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 747742a59..01d71d9d0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -324,6 +324,7 @@ class PhotoFragment : ViewPagerFragment() { super.onDestroyView() if (activity?.isActivityDestroyed() == false) { Glide.with(context).clear(view.gif_view) + view.subsampling_view.recycle() } } From 27e14b8fac3e52492f67c355e8a37c0941977937 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 15:47:58 +0100 Subject: [PATCH 05/28] show the Lock Orientation menu item only when the image isnt rotated --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 1 + 1 file changed, 1 insertion(+) 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 f901cb7c2..7533f5495 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -264,6 +264,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0f findItem(R.id.menu_hide).isVisible = !currentMedium.name.startsWith('.') findItem(R.id.menu_unhide).isVisible = currentMedium.name.startsWith('.') + findItem(R.id.menu_lock_orientation).isVisible = mRotationDegrees == 0f findItem(R.id.menu_lock_orientation).title = getString(if (mIsOrientationLocked) R.string.unlock_orientation else R.string.lock_orientation) findItem(R.id.menu_rotate).setShowAsAction( if (mRotationDegrees != 0f) { From 42408491516ec1192013bcdccece473bff32cc9e Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 16:46:13 +0100 Subject: [PATCH 06/28] add an activity for displaying hidden folders --- app/src/main/AndroidManifest.xml | 5 ++ .../activities/ExcludedFoldersActivity.kt | 22 ++++---- .../activities/HiddenFoldersActivity.kt | 52 +++++++++++++++++++ .../activities/IncludedFoldersActivity.kt | 22 ++++---- .../gallery/activities/SettingsActivity.kt | 7 +++ .../gallery/extensions/Context.kt | 34 ++++++++++++ app/src/main/res/layout/activity_settings.xml | 19 +++++++ ...cluded_folders.xml => menu_add_folder.xml} | 0 app/src/main/res/values-ar/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 | 2 + 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 + 32 files changed, 189 insertions(+), 20 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt rename app/src/main/res/menu/{menu_excluded_folders.xml => menu_add_folder.xml} (100%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a6e97ccb7..4c50f0162 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -107,6 +107,11 @@ android:label="@string/excluded_folders" android:parentActivityName=".activities.SettingsActivity"/> + + diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt index 0b1c722cf..f8d398eac 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt @@ -15,15 +15,17 @@ class ExcludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_manage_folders) - updateExcludedFolders() + updateFolders() } - private fun updateExcludedFolders() { + private fun updateFolders() { val folders = ArrayList() config.excludedFolders.mapTo(folders, { it }) - manage_folders_placeholder.text = getString(R.string.excluded_activity_placeholder) - manage_folders_placeholder.beVisibleIf(folders.isEmpty()) - manage_folders_placeholder.setTextColor(config.textColor) + manage_folders_placeholder.apply { + text = getString(R.string.excluded_activity_placeholder) + beVisibleIf(folders.isEmpty()) + setTextColor(config.textColor) + } val adapter = ManageFoldersAdapter(this, folders, true, this, manage_folders_list) {} adapter.setupDragListener(true) @@ -31,26 +33,26 @@ class ExcludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { } override fun onCreateOptionsMenu(menu: Menu?): Boolean { - menuInflater.inflate(R.menu.menu_excluded_folders, menu) + menuInflater.inflate(R.menu.menu_add_folder, menu) return true } override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.add_folder -> addExcludedFolder() + R.id.add_folder -> addFolder() else -> return super.onOptionsItemSelected(item) } return true } override fun refreshItems() { - updateExcludedFolders() + updateFolders() } - private fun addExcludedFolder() { + private fun addFolder() { FilePickerDialog(this, pickFile = false, showHidden = config.shouldShowHidden) { config.addExcludedFolder(it) - updateExcludedFolders() + updateFolders() } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt new file mode 100644 index 000000000..ffdb223e9 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt @@ -0,0 +1,52 @@ +package com.simplemobiletools.gallery.activities + +import android.os.Bundle +import android.view.Menu +import android.view.MenuItem +import com.simplemobiletools.commons.dialogs.FilePickerDialog +import com.simplemobiletools.commons.extensions.beVisibleIf +import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener +import com.simplemobiletools.gallery.R +import com.simplemobiletools.gallery.extensions.config +import com.simplemobiletools.gallery.extensions.getNoMediaFolders +import kotlinx.android.synthetic.main.activity_manage_folders.* + +class HiddenFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_manage_folders) + updateFolders() + } + + private fun updateFolders() { + val folders = getNoMediaFolders() + manage_folders_placeholder.apply { + text = getString(R.string.hidden_folders_placeholder) + beVisibleIf(folders.isEmpty()) + setTextColor(config.textColor) + } + } + + override fun onCreateOptionsMenu(menu: Menu?): Boolean { + menuInflater.inflate(R.menu.menu_add_folder, menu) + return true + } + + override fun onOptionsItemSelected(item: MenuItem): Boolean { + when (item.itemId) { + R.id.add_folder -> addFolder() + else -> return super.onOptionsItemSelected(item) + } + return true + } + + override fun refreshItems() { + updateFolders() + } + + private fun addFolder() { + FilePickerDialog(this, pickFile = false, showHidden = config.shouldShowHidden) { + + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt index c9f67d621..cb565c6b3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt @@ -16,15 +16,17 @@ class IncludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_manage_folders) - updateIncludedFolders() + updateFolders() } - private fun updateIncludedFolders() { + private fun updateFolders() { val folders = ArrayList() config.includedFolders.mapTo(folders, { it }) - manage_folders_placeholder.text = getString(R.string.included_activity_placeholder) - manage_folders_placeholder.beVisibleIf(folders.isEmpty()) - manage_folders_placeholder.setTextColor(config.textColor) + manage_folders_placeholder.apply { + text = getString(R.string.included_activity_placeholder) + beVisibleIf(folders.isEmpty()) + setTextColor(config.textColor) + } val adapter = ManageFoldersAdapter(this, folders, false, this, manage_folders_list) {} adapter.setupDragListener(true) @@ -32,26 +34,26 @@ class IncludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { } override fun onCreateOptionsMenu(menu: Menu?): Boolean { - menuInflater.inflate(R.menu.menu_included_folders, menu) + menuInflater.inflate(R.menu.menu_add_folder, menu) return true } override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.add_folder -> addIncludedFolder() + R.id.add_folder -> addFolder() else -> return super.onOptionsItemSelected(item) } return true } override fun refreshItems() { - updateIncludedFolders() + updateFolders() } - private fun addIncludedFolder() { + private fun addFolder() { FilePickerDialog(this, pickFile = false, showHidden = config.shouldShowHidden) { config.addIncludedFolder(it) - updateIncludedFolders() + updateFolders() Thread { scanPath(it) }.start() 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 950f356cf..18cbad383 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -38,6 +38,7 @@ class SettingsActivity : SimpleActivity() { setupUseEnglish() setupManageIncludedFolders() setupManageExcludedFolders() + setupManageHiddenFolders() setupShowHiddenFolders() setupAutoplayVideos() setupLoopVideos() @@ -89,6 +90,12 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupManageHiddenFolders() { + settings_manage_hidden_folders_holder.setOnClickListener { + startActivity(Intent(this, HiddenFoldersActivity::class.java)) + } + } + private fun setupShowHiddenFolders() { settings_show_hidden_folders.isChecked = config.showHiddenMedia settings_show_hidden_folders_holder.setOnClickListener { 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 d91b80885..58516723d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -3,14 +3,19 @@ package com.simplemobiletools.gallery.extensions import android.content.Context import android.content.Intent import android.content.res.Configuration +import android.database.Cursor import android.graphics.Point import android.media.AudioManager import android.os.Build +import android.provider.MediaStore import android.view.WindowManager +import com.simplemobiletools.commons.extensions.getStringValue import com.simplemobiletools.commons.extensions.humanizePath import com.simplemobiletools.gallery.activities.SettingsActivity import com.simplemobiletools.gallery.helpers.Config +import com.simplemobiletools.gallery.helpers.NOMEDIA import com.simplemobiletools.gallery.models.Directory +import java.io.File val Context.portrait get() = resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT val Context.audioManager get() = getSystemService(Context.AUDIO_SERVICE) as AudioManager @@ -73,3 +78,32 @@ fun Context.getSortedDirectories(source: ArrayList): ArrayList { + val folders = ArrayList() + + val uri = MediaStore.Files.getContentUri("external") + val projection = arrayOf(MediaStore.Files.FileColumns.DATA) + val selection = "${MediaStore.Files.FileColumns.MEDIA_TYPE} = ? AND ${MediaStore.Files.FileColumns.TITLE} LIKE ?" + val selectionArgs = arrayOf(MediaStore.Files.FileColumns.MEDIA_TYPE_NONE.toString(), "%$NOMEDIA%") + val sortOrder = MediaStore.Files.FileColumns.DATA + + var cursor: Cursor? = null + + try { + cursor = contentResolver.query(uri, projection, selection, selectionArgs, sortOrder) + if (cursor?.moveToFirst() == true) { + do { + val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA) ?: continue + val noMediaFile = File(path) + if (noMediaFile.exists()) { + folders.add("${noMediaFile.parent}/") + } + } while (cursor.moveToNext()) + } + } finally { + cursor?.close() + } + + return folders +} diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 9437d049a..7e96f52dd 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -88,6 +88,25 @@ + + + + + + حذف الكل هل تريد إزالة جميع المجلدات من القائمة المستبعدة؟ لن يؤدي هذا إلى حذف المجلدات + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. المجلدات المضمنة diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index c7dd015b0..f53e0908d 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -44,7 +44,9 @@ Vyloučené složky budou spolu s podsložkami vyloučeny jen z Jednoduché Galerie, ostatní aplikace je nadále uvidí.\n\nPokud je chcete skrýt i před ostatními aplikacemi, použijte funkci Skrýt. Odstranit všechny Odstranit všechny složky ze seznamu vyloučených? Tato operace neodstraní obsah složek. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Přidané složky diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index ad8a1e6f6..823b3bade 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -44,7 +44,9 @@ \'Ordner ausblenden\' wird ausgewählte Ordner und deren Unterordner nur in dieser App ausblenden. Andere Apps werden solche Ordner weiterhin anzeigen.\\n\\nWenn Sie Ordner auch für andere Apps verstecken wollen, verwenden Sie dafür die Funktion \'Ordner verstecken\'. Alle entfernen Alle Ordner aus der Ausgeblendet-Liste entfernen? Die Ordner selbst werden nicht gelöscht. + Hidden folders Versteckte Ordner verwalten + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Einbezogene Ordner diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index bfce999e1..01c71721d 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -44,7 +44,9 @@ Excluir las carpetas las hará junto a sus subcarpetas ocultas sólo en Simple Gallery, estas seguirán siendo visibles en otras aplicaciones.\\n\\nSi desea ocultarlo de otras aplicaciones, utilice la función de Ocultar. Eliminar todo ¿Eliminar todas las carpetas de la lista de excluidas? Esto no borrará las carpetas. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Carpetas incluidas diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index c4a20e38d..6525e58d1 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -44,7 +44,9 @@ Kansion poissulkeminen piilottaa kansion alikansioineen vain Simple Galleryssa, ne jäävät näkyviin muihin sovelluksiin.\n\nJos haluat piilottaa kansion myös muissa sovelluksissa, käytä piilota-funktiota. Poista kaikki Poista kaikki kansiot poissuljettujen listasta? Tämä ei poista kansioita. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Sisällytä kansiot diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 7701830bc..d3386859c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -44,7 +44,9 @@ Exclure des dossiers les masquera ainsi que leurs sous-dossiers uniquement dans Simple Galerie, ils seront toujours visibles depuis d\'autres applications.\\n\\nSi vous voulez aussi les masquer ailleurs, utilisez la fonction Masquer. Tout supprimer Supprimer tous les dossiers de la liste des exclusions ? Ceci n\'effacera pas les dossiers. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Dossiers inclus diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 6219ba6cd..8399cf213 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -44,7 +44,9 @@ Excluír un cartafol xunto cos subcartafoles só terá efecto en Simple Gallery, seguirán sendo visibles en outros aplicativos.\n\nSi tamén quere excluílos en outros aplicativos, utilice a opción Agochar. Eliminar todos Eliminar todos os cartafoles da lista de excluídos? Esto non borrará os cartafoles. + Hidden folders Xestionar cartafoles ocultos + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Cartafoles incluídos diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 0ba59c891..5bd5731f6 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -44,7 +44,9 @@ Izostavljanje direktorija učiniti će ih nevidljivim zajedno s njihovim poddirektorijima samo u Simple Gallery, ali će oni biti vidljivi u drugim aplikacijama.\n\nAko ih želite sakriti od drugih aplikacija također, koristite Sakrij opciju. Ukloni sve Ukloni sve direktorije iz liste izostavljenih? Ovo neće izbrisati direktorije. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Dodaj direktorije diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index aff4967b1..09d50ee68 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -44,7 +44,9 @@ Excluding folders will make them together with their subfolders hidden just in Simple Gallery, they will still be visible in other applications.\\n\\nIf you want to hide them from other apps too, use the Hide function. Remove all Remove all folders from the list of excluded? This will not delete the folders. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Included folders diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index b969dfde5..dc8833fcb 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -44,7 +44,9 @@ L\'esclusione delle cartelle e delle sottocartelle le renderà nascoste solo in Simple Gallery, saranno ancora visibili in altre applicazioni.\\n\\nSe desideri nasconderle anche nelle altre app, usa la funzione Nascondi. Rimuovi tutte Rimuovere tutte le cartelle dalla lista delle esclusioni? Ciò non eliminerà le cartelle. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Includi cartelle diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index aae7cccbf..f74b04977 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -44,7 +44,9 @@ フォルダーを除外すると、サブフォルダーも含めSimple Galleyの一覧から除外します。他のアプリでは引き続き表示されます。\\n\\n他のアプリでも非表示にしたい場合は、「非表示」機能を使用してください。 すべて解除 除外するフォルダーの登録をすべて解除しますか? フォルダー自体は削除されません。 + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. 追加フォルダー diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 202baecaa..962454fcf 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -44,7 +44,9 @@ Excluding folders will make them together with their subfolders hidden just in Simple Gallery, they will still be visible in other applications.\n\nIf you want to hide them from other apps too, use the Hide function. 모두 제거 제외 목록을 모두 삭제 하시겠습니다? 목록을 삭제해도 폴더가 삭제되지는 않습니다. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. 포함된 폴더 diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 3d1b245e1..4b350e5ea 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -44,7 +44,9 @@ Ekskludering av mapper vil gjøre dem sammen med deres undermapper, skjulte bare i denne appen. De vil fortsatt være synlige i andre apper.\n\nHvis du vil skjule dem fra andre apper, bruk Skjul-funksjonen. Fjern alle Fjerne alle mapper fra listen av ekskluderte? Dette sletter ikke mappene. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Inkluderte mapper diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index fc3dd2d0b..cda620ad9 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -44,7 +44,9 @@ Uitsluiten zal mappen en hun submappen verbergen voor deze galerij, maar niet voor andere apps.\n\nAls u de mappen ook in andere apps wilt verbergen, kies dan voor de functie Verbergen. Alles verwijderen Verwijder alles uit de lijst van uitgesloten mappen? Dit zal de mappen zelf niet verwijderen. + Hidden folders Verborgen mappen beheren + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Toegevoegde mappen diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 7a707b80a..e1b787e16 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -44,7 +44,9 @@ Wykluczenie folderów ukryje je tylko w aplikacji Simple Gallery, w innych aplikacjach będą one wciąż widoczne.\n\nJeśli chcesz je ukryć także w innych aplikacjach, użyj funkcji ukrywania. Usuń wszystko Usunąć wszystkie foldery z listy wykluczonych? Foldery nie zostaną fizycznie usunięte. + Hidden folders    Zarządzaj ukrytymi folderami + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Dołączone foldery diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index e9bf84b18..ee2ff4253 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -44,7 +44,9 @@ A exclusão de uma pasta apenas oculta o seu conteúdo da galeria, pois todos os outros aplicativos poderão acessá-las.\\n\\nSe quiser ocultar de todos os aplicativos, utilize a função ocultar. Remover todas Remover todas as pastas da lista de exclusões? Esta ação não apaga as pastas. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Pastas incluídas diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 199672bdd..e16bc747c 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -44,7 +44,9 @@ A exclusão de uma pasta apenas oculta o seu conteúdo do Simple Gallery porque as outras aplicações continuarão a poder aceder-lhes.\\n\\nSe quiser ocultar também das outras aplicações, utilize a função Ocultar. Remover todas Remover todas as pastas de lista de exclusões? Esta ação não apaga as pastas. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Pastas incluídas diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 1a6e4bff4..358289697 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -44,7 +44,9 @@ Исключая папки, вы сделаете их скрытыми вместе с подпапками в Simple Gallery, но они будут видны в других приложениях. Если вы хотите скрыть их в других приложениях, используйте функцию Скрыть. Удалить всё Очистить список исключённых? Сами папки не будут удалены. + Hidden folders Управление скрытыми папками + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Включённые папки diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index ed93d39ab..f29579a76 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -44,7 +44,9 @@ Vylúčené priečinky budú spolu s podpriečinkami ukryté iba pred Jednoduchou Galériou, ostatné aplikácie ich budú stále vidieť.\\n\\nAk ich chcete ukryť aj pred ostatnými aplikáciami, použite funkciu Skryť. Odstrániť všetky Odstrániť všetky priečinky zo zoznamu vylúčených? Táto operácia neodstráni samotný obsah priečinkov. + Skryté priečinky Spravovať skryté priečinky + Zdá sa, že nemáte žiadne priečinky skryté pomocou súboru \".nomedia\". Pridané priečinky diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 431ab1bc9..346b53723 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -44,7 +44,9 @@ Uteslutning av mappar döljer bara dem och deras undermappar i Simple Gallery, de visas fortfarande i andra appar.\\n\\nAnvänd Dölj-funktionen om du även vill dölja dem från andra appar. Ta bort alla Vill du ta bort alla mappar från uteslutningslistan? Detta raderar inte mapparna. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Inkluderade mappar diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 6d99ec493..a3263998c 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -44,7 +44,9 @@ Klasörler hariç tutulduğunda, onları Basit Galeri\'de gizli olan alt klasörleriyle bir araya getirirler, ancak yine de diğer uygulamalarda görünür olurlar.\n\nBunları diğer uygulamalardan gizlemek isterseniz, Gizle işlevini kullanın. Hepsini sil Hariç tutulanlar listesinden tüm klasörleri kaldırmak mı istiyorsunuz? Bu, klasörler silinmez. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Dahil edilen klasörler diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ecd589bf3..120a209bb 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -44,7 +44,9 @@ 此目录及其子目录中的媒体将不会在“简约图库”中显示,但是其它应用可以访问。如果您想对其它应用隐藏,请使用隐藏功能。 移除全部 是否删除排除列表中的所有项目?此操作不会删除文件夹本身。 + Hidden folders 管理隐藏目录 + Seems like you don\'t have any folders hidden with a \".nomedia\" file. 包含目录 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 2415e0830..9a1fb9ef5 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -44,7 +44,9 @@ 「排除資料夾」只會將選擇的資料夾與子資料夾一起從簡易相簿中隱藏,他們仍會出現在其他應用程式中。\n\n如果您要在其他應用程式中也隱藏,請使用「隱藏」功能。 移除全部 是否將排除列表中的所有資料夾都移除?這不會刪除資料夾。 + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. 包含資料夾 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e2127294e..7220a3f2a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -44,7 +44,9 @@ Excluding folders will make them together with their subfolders hidden just in Simple Gallery, they will still be visible in other applications.\n\nIf you want to hide them from other apps too, use the Hide function. Remove all Remove all folders from the list of excluded? This will not delete the folders. + Hidden folders Manage hidden folders + Seems like you don\'t have any folders hidden with a \".nomedia\" file. Included folders From f310802bd8012c790417dd67bd984f3da3305b2e Mon Sep 17 00:00:00 2001 From: Pzqqt <821026875@qq.com> Date: Sat, 30 Dec 2017 00:38:32 +0800 Subject: [PATCH 07/28] 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 120a209bb..06b26f65c 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -44,9 +44,9 @@ 此目录及其子目录中的媒体将不会在“简约图库”中显示,但是其它应用可以访问。如果您想对其它应用隐藏,请使用隐藏功能。 移除全部 是否删除排除列表中的所有项目?此操作不会删除文件夹本身。 - Hidden folders + 隐藏目录 管理隐藏目录 - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + 看起来你没有任何使用“.nomedia”文件隐藏的目录。 包含目录 From 865db7099fe5d8300278d0644d73574cb3601100 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 18:11:23 +0100 Subject: [PATCH 08/28] implement the hidden folder adapter for adding/removing items --- .../activities/HiddenFoldersActivity.kt | 12 ++- .../adapters/ManageHiddenFoldersAdapter.kt | 94 +++++++++++++++++++ app/src/main/res/menu/cab_hidden_folders.xml | 9 ++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/gallery/adapters/ManageHiddenFoldersAdapter.kt create mode 100644 app/src/main/res/menu/cab_hidden_folders.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt index ffdb223e9..7caa96d6b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt @@ -7,6 +7,8 @@ import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.gallery.R +import com.simplemobiletools.gallery.adapters.ManageHiddenFoldersAdapter +import com.simplemobiletools.gallery.extensions.addNoMedia import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.extensions.getNoMediaFolders import kotlinx.android.synthetic.main.activity_manage_folders.* @@ -25,6 +27,10 @@ class HiddenFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { beVisibleIf(folders.isEmpty()) setTextColor(config.textColor) } + + val adapter = ManageHiddenFoldersAdapter(this, folders, this, manage_folders_list) {} + adapter.setupDragListener(true) + manage_folders_list.adapter = adapter } override fun onCreateOptionsMenu(menu: Menu?): Boolean { @@ -46,7 +52,11 @@ class HiddenFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { private fun addFolder() { FilePickerDialog(this, pickFile = false, showHidden = config.shouldShowHidden) { - + Thread { + addNoMedia(it) { + updateFolders() + } + }.start() } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/ManageHiddenFoldersAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/ManageHiddenFoldersAdapter.kt new file mode 100644 index 000000000..4126a5c21 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/ManageHiddenFoldersAdapter.kt @@ -0,0 +1,94 @@ +package com.simplemobiletools.gallery.adapters + +import android.view.Menu +import android.view.View +import android.view.ViewGroup +import com.simplemobiletools.commons.activities.BaseSimpleActivity +import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter +import com.simplemobiletools.commons.extensions.isPathOnSD +import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener +import com.simplemobiletools.commons.views.MyRecyclerView +import com.simplemobiletools.gallery.R +import com.simplemobiletools.gallery.extensions.config +import com.simplemobiletools.gallery.extensions.removeNoMedia +import kotlinx.android.synthetic.main.item_manage_folder.view.* +import java.io.File +import java.util.* + +class ManageHiddenFoldersAdapter(activity: BaseSimpleActivity, var folders: ArrayList, val listener: RefreshRecyclerViewListener?, + recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, itemClick) { + + private val config = activity.config + + override fun getActionMenuId() = R.menu.cab_hidden_folders + + override fun prepareActionMode(menu: Menu) {} + + override fun prepareItemSelection(view: View) {} + + override fun markItemSelection(select: Boolean, view: View?) { + view?.manage_folder_holder?.isSelected = select + } + + override fun actionItemPressed(id: Int) { + when (id) { + R.id.cab_unhide -> tryUnhideFolders() + } + } + + override fun getSelectableItemCount() = folders.size + + override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int) = createViewHolder(R.layout.item_manage_folder, parent) + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val folder = folders[position] + val view = holder.bindView(folder) { itemView, layoutPosition -> + setupView(itemView, folder) + } + bindViewHolder(holder, position, view) + } + + override fun getItemCount() = folders.size + + private fun setupView(view: View, folder: String) { + view.apply { + manage_folder_title.apply { + text = folder + setTextColor(config.textColor) + } + } + } + + private fun tryUnhideFolders() { + val removeFolders = ArrayList(selectedPositions.size) + + val sdCardPaths = ArrayList() + selectedPositions.forEach { + if (activity.isPathOnSD(folders[it])) { + sdCardPaths.add(folders[it]) + } + } + + if (sdCardPaths.isNotEmpty()) { + activity.handleSAFDialog(File(sdCardPaths.first())) { + unhideFolders(removeFolders) + } + } else { + unhideFolders(removeFolders) + } + } + + private fun unhideFolders(removeFolders: ArrayList) { + selectedPositions.sortedDescending().forEach { + val folder = folders[it] + removeFolders.add(folder) + activity.removeNoMedia(folder) + } + + folders.removeAll(removeFolders) + removeSelectedItems() + if (folders.isEmpty()) { + listener?.refreshItems() + } + } +} diff --git a/app/src/main/res/menu/cab_hidden_folders.xml b/app/src/main/res/menu/cab_hidden_folders.xml new file mode 100644 index 000000000..3bc48d529 --- /dev/null +++ b/app/src/main/res/menu/cab_hidden_folders.xml @@ -0,0 +1,9 @@ + + + + From cd03b455dca0d06af8373a04a493dceaba916f3e Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 18:17:33 +0100 Subject: [PATCH 09/28] sort the hidden folders by .nomedia last modified + fix threading --- .../activities/HiddenFoldersActivity.kt | 21 +++++---- .../gallery/extensions/Context.kt | 46 ++++++++++--------- 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt index 7caa96d6b..79ce030f4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/HiddenFoldersActivity.kt @@ -21,16 +21,19 @@ class HiddenFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { } private fun updateFolders() { - val folders = getNoMediaFolders() - manage_folders_placeholder.apply { - text = getString(R.string.hidden_folders_placeholder) - beVisibleIf(folders.isEmpty()) - setTextColor(config.textColor) - } + getNoMediaFolders { + runOnUiThread { + manage_folders_placeholder.apply { + text = getString(R.string.hidden_folders_placeholder) + beVisibleIf(it.isEmpty()) + setTextColor(config.textColor) + } - val adapter = ManageHiddenFoldersAdapter(this, folders, this, manage_folders_list) {} - adapter.setupDragListener(true) - manage_folders_list.adapter = adapter + val adapter = ManageHiddenFoldersAdapter(this, it, this, manage_folders_list) {} + adapter.setupDragListener(true) + manage_folders_list.adapter = adapter + } + } } override fun onCreateOptionsMenu(menu: Menu?): Boolean { 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 58516723d..62c8f95c7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -79,31 +79,33 @@ fun Context.getSortedDirectories(source: ArrayList): ArrayList { - val folders = ArrayList() +fun Context.getNoMediaFolders(callback: (folders: ArrayList) -> Unit) { + Thread { + val folders = ArrayList() - val uri = MediaStore.Files.getContentUri("external") - val projection = arrayOf(MediaStore.Files.FileColumns.DATA) - val selection = "${MediaStore.Files.FileColumns.MEDIA_TYPE} = ? AND ${MediaStore.Files.FileColumns.TITLE} LIKE ?" - val selectionArgs = arrayOf(MediaStore.Files.FileColumns.MEDIA_TYPE_NONE.toString(), "%$NOMEDIA%") - val sortOrder = MediaStore.Files.FileColumns.DATA + val uri = MediaStore.Files.getContentUri("external") + val projection = arrayOf(MediaStore.Files.FileColumns.DATA) + val selection = "${MediaStore.Files.FileColumns.MEDIA_TYPE} = ? AND ${MediaStore.Files.FileColumns.TITLE} LIKE ?" + val selectionArgs = arrayOf(MediaStore.Files.FileColumns.MEDIA_TYPE_NONE.toString(), "%$NOMEDIA%") + val sortOrder = "${MediaStore.Files.FileColumns.DATE_MODIFIED} DESC" - var cursor: Cursor? = null + var cursor: Cursor? = null - try { - cursor = contentResolver.query(uri, projection, selection, selectionArgs, sortOrder) - if (cursor?.moveToFirst() == true) { - do { - val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA) ?: continue - val noMediaFile = File(path) - if (noMediaFile.exists()) { - folders.add("${noMediaFile.parent}/") - } - } while (cursor.moveToNext()) + try { + cursor = contentResolver.query(uri, projection, selection, selectionArgs, sortOrder) + if (cursor?.moveToFirst() == true) { + do { + val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA) ?: continue + val noMediaFile = File(path) + if (noMediaFile.exists()) { + folders.add("${noMediaFile.parent}/") + } + } while (cursor.moveToNext()) + } + } finally { + cursor?.close() } - } finally { - cursor?.close() - } - return folders + callback(folders) + }.start() } From 00333369a1f8a9e4193146fd6d107ce79c3e223b Mon Sep 17 00:00:00 2001 From: Phoenix1747 Date: Fri, 29 Dec 2017 18:39:59 +0100 Subject: [PATCH 10/28] Update DE for commit 4240849. --- app/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 823b3bade..05fd8dbac 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -44,9 +44,9 @@ \'Ordner ausblenden\' wird ausgewählte Ordner und deren Unterordner nur in dieser App ausblenden. Andere Apps werden solche Ordner weiterhin anzeigen.\\n\\nWenn Sie Ordner auch für andere Apps verstecken wollen, verwenden Sie dafür die Funktion \'Ordner verstecken\'. Alle entfernen Alle Ordner aus der Ausgeblendet-Liste entfernen? Die Ordner selbst werden nicht gelöscht. - Hidden folders + Versteckte Ordner Versteckte Ordner verwalten - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + Sieht so aus, als ob du keine Ordner mit einer \".nomedia\" Datei versteckt hast. Einbezogene Ordner From ad1abd81be621db0aecc18b3b385d1345ccf095c Mon Sep 17 00:00:00 2001 From: Nikola Trubitsyn Date: Fri, 29 Dec 2017 21:26:25 +0300 Subject: [PATCH 11/28] Update values-ru/strings.xml --- app/src/main/res/values-ru/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 358289697..5ce73d864 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -44,9 +44,9 @@ Исключая папки, вы сделаете их скрытыми вместе с подпапками в Simple Gallery, но они будут видны в других приложениях. Если вы хотите скрыть их в других приложениях, используйте функцию Скрыть. Удалить всё Очистить список исключённых? Сами папки не будут удалены. - Hidden folders + Скрытые папки Управление скрытыми папками - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + Похоже, у вас нет папок, скрытых файлом \".nomedia\". Включённые папки From 7f4ef710d16232b5d7dde9c31e0bd7dc3d1c2d37 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 20:40:22 +0100 Subject: [PATCH 12/28] add a vertical scrollbar to manage folder activities --- app/src/main/res/layout/activity_manage_folders.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/activity_manage_folders.xml b/app/src/main/res/layout/activity_manage_folders.xml index aaac86a7f..eaa902676 100644 --- a/app/src/main/res/layout/activity_manage_folders.xml +++ b/app/src/main/res/layout/activity_manage_folders.xml @@ -11,6 +11,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" + android:scrollbars="vertical" app:layoutManager="android.support.v7.widget.LinearLayoutManager"/> Date: Fri, 29 Dec 2017 20:53:09 +0100 Subject: [PATCH 13/28] Dutch --- app/src/main/res/values-nl/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index cda620ad9..783ae735f 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -44,9 +44,9 @@ Uitsluiten zal mappen en hun submappen verbergen voor deze galerij, maar niet voor andere apps.\n\nAls u de mappen ook in andere apps wilt verbergen, kies dan voor de functie Verbergen. Alles verwijderen Verwijder alles uit de lijst van uitgesloten mappen? Dit zal de mappen zelf niet verwijderen. - Hidden folders + Verborgen mappen Verborgen mappen beheren - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + Geen mappen gevonden die zijn verborgen door bestand \".nomedia\". Toegevoegde mappen From bc848e077c383375c8d8d2c28a7421a73098645d Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 21:09:12 +0100 Subject: [PATCH 14/28] improve some doubletap zoom ratios --- .../gallery/fragments/PhotoFragment.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 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 01d71d9d0..1a76b3571 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -277,22 +277,21 @@ class PhotoFragment : ViewPagerFragment() { } private fun getDoubleTapZoomScale(width: Int, height: Int): Float { - val bitmapAspectRatio = height / (width).toFloat() + val bitmapAspectRatio = height / width.toFloat() + val screenAspectRatio = ViewPagerActivity.screenHeight / ViewPagerActivity.screenWidth.toFloat() return if (context == null) { DEFAULT_DOUBLE_TAP_ZOOM - } else if (ViewPagerActivity.screenHeight / ViewPagerActivity.screenWidth.toFloat() == bitmapAspectRatio) { - DEFAULT_DOUBLE_TAP_ZOOM } else if (ViewPagerActivity.wasDecodedByGlide) { 1f - } else if (context!!.portrait && bitmapAspectRatio <= 1f) { + } else if (context!!.portrait && bitmapAspectRatio <= screenAspectRatio) { ViewPagerActivity.screenHeight / height.toFloat() - } else if (context!!.portrait && bitmapAspectRatio > 1f) { - ViewPagerActivity.screenHeight / width.toFloat() - } else if (!context!!.portrait && bitmapAspectRatio >= 1f) { + } else if (context!!.portrait && bitmapAspectRatio > screenAspectRatio) { ViewPagerActivity.screenWidth / width.toFloat() - } else if (!context!!.portrait && bitmapAspectRatio < 1f) { - ViewPagerActivity.screenWidth / height.toFloat() + } else if (!context!!.portrait && bitmapAspectRatio >= screenAspectRatio) { + ViewPagerActivity.screenWidth / width.toFloat() + } else if (!context!!.portrait && bitmapAspectRatio < screenAspectRatio) { + ViewPagerActivity.screenHeight / height.toFloat() } else { DEFAULT_DOUBLE_TAP_ZOOM } From 30374930bddeb4d24a8a9f154344a166aa4b829f Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 21:35:13 +0100 Subject: [PATCH 15/28] properly handle zooming at images rotated by exif --- .../gallery/fragments/PhotoFragment.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 1a76b3571..35796660a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -6,6 +6,7 @@ import android.graphics.BitmapFactory import android.graphics.Color import android.graphics.Matrix import android.graphics.drawable.ColorDrawable +import android.media.ExifInterface.* import android.net.Uri import android.os.Bundle import android.view.LayoutInflater @@ -137,9 +138,9 @@ class PhotoFragment : ViewPagerFragment() { } private fun degreesForRotation(orientation: Int) = when (orientation) { - 8 -> 270 - 3 -> 180 - 6 -> 90 + ORIENTATION_ROTATE_270 -> 270 + ORIENTATION_ROTATE_180 -> 180 + ORIENTATION_ROTATE_90 -> 90 else -> 0 } @@ -253,7 +254,9 @@ class PhotoFragment : ViewPagerFragment() { override fun onReady() { background = ColorDrawable(if (context.config.blackBackground) Color.BLACK else context.config.backgroundColor) - setDoubleTapZoomScale(getDoubleTapZoomScale(sWidth, sHeight)) + 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 + setDoubleTapZoomScale(getDoubleTapZoomScale(useWidth, useHeight)) } override fun onTileLoadError(e: Exception?) { From 422b1fb6903b35ab9d24040338ee011b6db2b9a3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 21:42:25 +0100 Subject: [PATCH 16/28] use the default zoom level if the image matches the screen --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 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 35796660a..b99ac8867 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -37,7 +37,7 @@ import java.io.File import java.io.FileOutputStream class PhotoFragment : ViewPagerFragment() { - private var DEFAULT_DOUBLE_TAP_ZOOM = 5f + private var DEFAULT_DOUBLE_TAP_ZOOM = 2f private var isFragmentVisible = false private var isFullscreen = false private var wasInit = false @@ -283,7 +283,7 @@ class PhotoFragment : ViewPagerFragment() { val bitmapAspectRatio = height / width.toFloat() val screenAspectRatio = ViewPagerActivity.screenHeight / ViewPagerActivity.screenWidth.toFloat() - return if (context == null) { + return if (context == null || bitmapAspectRatio == screenAspectRatio) { DEFAULT_DOUBLE_TAP_ZOOM } else if (ViewPagerActivity.wasDecodedByGlide) { 1f From 46a143e4ac16abea8e93d5b5c2822edf03c36fb2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 22:07:47 +0100 Subject: [PATCH 17/28] couple slideshow improvements --- .../gallery/activities/ViewPagerActivity.kt | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) 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 7533f5495..84fd594f8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -317,6 +317,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View view_pager.apply { adapter = pagerAdapter currentItem = mPos + removeOnPageChangeListener(this@ViewPagerActivity) addOnPageChangeListener(this@ViewPagerActivity) } } @@ -351,10 +352,16 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } override fun onAnimationEnd(animation: Animator?) { - view_pager.endFakeDrag() + if (view_pager.isFakeDragging) { + try { + view_pager.endFakeDrag() + } catch (ignored: Exception) { + stopSlideshow() + } - if (view_pager.currentItem == oldPosition) { - slideshowEnded(forward) + if (view_pager.currentItem == oldPosition) { + slideshowEnded(forward) + } } } @@ -374,7 +381,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View val dragPosition = animation.animatedValue as Int val dragOffset = dragPosition - oldDragPosition oldDragPosition = dragPosition - view_pager.fakeDragBy(dragOffset * (if (forward) 1f else -1f)) + try { + view_pager.fakeDragBy(dragOffset * (if (forward) 1f else -1f)) + } catch (e: Exception) { + stopSlideshow() + } } } }) @@ -399,8 +410,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun stopSlideshow() { if (mIsSlideshowActive) { - showSystemUI() mIsSlideshowActive = false + showSystemUI() mSlideshowHandler.removeCallbacksAndMessages(null) window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) } From f63a8eebac46b76c0b5871ab5211474fe647e8d4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 22:17:09 +0100 Subject: [PATCH 18/28] release video mediaplayer on a background thread --- .../simplemobiletools/gallery/fragments/VideoFragment.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 7ee976475..4942ea351 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -467,9 +467,11 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee } private fun releaseMediaPlayer() { - mMediaPlayer?.setSurface(null) - mMediaPlayer?.release() - mMediaPlayer = null + Thread { + mMediaPlayer?.setSurface(null) + mMediaPlayer?.release() + mMediaPlayer = null + }.start() } private fun videoPrepared(mediaPlayer: MediaPlayer) { From 88d8f39118ff339482dec391f7281890d8ee30b0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 22:20:10 +0100 Subject: [PATCH 19/28] handle whole bitmap saving in edit activity on a background thread --- .../gallery/activities/EditActivity.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index d41ba13c4..8e3d4d6c4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -184,18 +184,17 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } private fun saveBitmapToFile(bitmap: Bitmap, path: String) { - val file = File(path) - try { - getFileOutputStream(file) { - if (it != null) { - Thread { + Thread { + val file = File(path) + getFileOutputStream(file) { + if (it != null) { saveBitmap(file, bitmap, it) - }.start() - } else { - toast(R.string.image_editing_failed) + } else { + toast(R.string.image_editing_failed) + } } - } + }.start() } catch (e: Exception) { showErrorToast(e) } catch (e: OutOfMemoryError) { From 5a3ae1f13797112d7ddc7dfc1034c11bc616b962 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 22:35:54 +0100 Subject: [PATCH 20/28] update commons to 3.5.0 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index ba11cf9e6..c68b7fe2b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.4.15' + implementation 'com.simplemobiletools:commons:3.5.0' implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0' implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0' implementation 'com.android.support:multidex:1.0.2' From fbab0880a48db4b52b8d6b0f92c3f39332bb27e1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 22:49:10 +0100 Subject: [PATCH 21/28] update version to 3.1.1 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c68b7fe2b..91975289a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "com.simplemobiletools.gallery" minSdkVersion 16 targetSdkVersion 27 - versionCode 150 - versionName "3.1.0" + versionCode 151 + versionName "3.1.1" multiDexEnabled true setProperty("archivesBaseName", "gallery") } From d4d06cf2a79c448e8dda3b1473be3bb92ab5118f Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 Dec 2017 22:49:15 +0100 Subject: [PATCH 22/28] updating changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da47dde05..d4240cd4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changelog ========== +Version 3.1.1 *(2017-12-29)* +---------------------------- + + * Added a new setting item for managing folders hidden with .nomedia + * Speed up image loading + * Use copy/delete instead of move on Android 8.x + * Improved double-tap zoom ratios + Version 3.1.0 *(2017-12-25)* ---------------------------- From 1b496b563255c851e5497c2208b8193b91416ebc Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 30 Dec 2017 09:00:36 +0100 Subject: [PATCH 23/28] move mediaplayer releasing back on main thread --- .../simplemobiletools/gallery/fragments/VideoFragment.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 4942ea351..7ee976475 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -467,11 +467,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee } private fun releaseMediaPlayer() { - Thread { - mMediaPlayer?.setSurface(null) - mMediaPlayer?.release() - mMediaPlayer = null - }.start() + mMediaPlayer?.setSurface(null) + mMediaPlayer?.release() + mMediaPlayer = null } private fun videoPrepared(mediaPlayer: MediaPlayer) { From e30333876e8ca3329afe69808da6c93e4df71b38 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 30 Dec 2017 09:36:02 +0100 Subject: [PATCH 24/28] update version to 3.1.2 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 91975289a..3c49e690e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "com.simplemobiletools.gallery" minSdkVersion 16 targetSdkVersion 27 - versionCode 151 - versionName "3.1.1" + versionCode 152 + versionName "3.1.2" multiDexEnabled true setProperty("archivesBaseName", "gallery") } From 0ba31cc64643c5b2413d2180a5ea21676b76bb88 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 30 Dec 2017 09:36:08 +0100 Subject: [PATCH 25/28] updating changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4240cd4a..f1484fbfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========== +Version 3.1.2 *(2017-12-30)* +---------------------------- + + * Fixed some video related crashes + Version 3.1.1 *(2017-12-29)* ---------------------------- From 6381dd34f1160e3647bde5b9d358b46e832537ff Mon Sep 17 00:00:00 2001 From: Phoenix1747 Date: Sat, 30 Dec 2017 13:32:50 +0100 Subject: [PATCH 26/28] Update DE Play Store description --- app/src/main/res/values-de/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 05fd8dbac..d1c637205 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -136,15 +136,15 @@ - Eine schlichte Galerie zum Betrachten von Bildern und Videos ohne Werbung. + Eine schlichte Galerie zum Betrachten von Bildern und Videos, ganz ohne Werbung. - Eine schlichte App zum Betrachten von Bildern und Videos. Die Medien können nach Datum, Größe, Name sowie auf- oder absteigend sortiert werden, in Bilder kann auch hineingezoomt werden. Die Vorschau-Kacheln werden in mehreren Spalten abhängig von der Displaygröße angezeigt, die Spaltenanzahl ist mit Zweifingergesten änderbar. Die Medien können umbenannt, geteilt, gelöscht, kopiert und verschoben werden. Bilder können direkt aus der App heraus zugeschnitten, gedreht oder als Hintergrund festgelegt werden. + Eine schlichte App zum Betrachten von Bildern und Videos. Alle Medien können nach Datum, Größe, Name sowie auf- oder absteigend sortiert werden, in Bilder kann auch hineingezoomt werden. Die Vorschau-Kacheln werden in mehreren Spalten abhängig von der Displaygröße angezeigt, die Spaltenanzahl ist mit Zweifingergesten änderbar. Die Medien können umbenannt, geteilt, gelöscht, kopiert und verschoben werden. Bilder können direkt aus der App heraus zugeschnitten, gedreht oder als Hintergrund festgelegt werden. - Diese Galerie bietet auch für Drittanbieter einige Funktionen an: zum Vorschauen von Bildern / Videos, zum Hinzufügen von Anhängen bei Email-Apps, etc. Sie ist perfekt für den täglichen Gebrauch. + Diese Galerie bietet auch für Drittanbieter einige Funktionen an: zur Vorschau von Bildern/Videos, zum Hinzufügen von Anhängen bei Email-Apps, etc. Sie ist perfekt für den täglichen Gebrauch. Die Berechtigung für Fingerabdrücke wird nur benötigt, um die Sichtbarkeit von versteckten Dateien oder die gesamte App zu sperren. - Beinhaltet keine Werbung oder unnötigen Berechtigungen. Sie ist komplett Open Source, verwendete Farben sind anpassbar. + Beinhaltet keine Werbung oder unnötige Berechtigungen. Sie ist komplett Open Source, alle verwendeten Farben sind anpassbar. Diese App ist nur eine aus einer größeren Serie von schlichten Apps. Der Rest davon findet sich auf http://www.simplemobiletools.com From bfc2bfc023b67c8d28cd844dfda3ea8b8854380e Mon Sep 17 00:00:00 2001 From: anthologist Date: Sat, 30 Dec 2017 16:17:41 +0100 Subject: [PATCH 27/28] updated italian --- app/src/main/res/values-it/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index dc8833fcb..1921a56f0 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -44,9 +44,9 @@ L\'esclusione delle cartelle e delle sottocartelle le renderà nascoste solo in Simple Gallery, saranno ancora visibili in altre applicazioni.\\n\\nSe desideri nasconderle anche nelle altre app, usa la funzione Nascondi. Rimuovi tutte Rimuovere tutte le cartelle dalla lista delle esclusioni? Ciò non eliminerà le cartelle. - Hidden folders - Manage hidden folders - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + Cartelle nascoste + Gestisci le cartelle nascoste + Pare che tu non abbia alcuna cartella nascosta con un file \".nomedia\". Includi cartelle @@ -124,7 +124,7 @@ Impostazione di sistema Rotazione dispositivo Proporzioni - Black background and status bar at fullscreen media + Sfondo e barra di stato neri con media a schermo intero Scorri le miniature orizzontalmente Nascondi UI di sistema con media a schermo intero Elimina cartelle vuote dopo averne eliminato il contenuto @@ -142,7 +142,7 @@ Simple Gallery è anche offerta per utilizzo di terze parti per anteprime di immagini / video, aggiunta di allegati ai client email, ecc. È perfetta per un uso quotidiano. - The fingerprint permission is needed for locking either hidden item visibility, or the whole app. + L\'autorizzazione per le impronte è necessaria per bloccare la visibilità di alcuni elementi o dell\'intera app. Non contiene pubblicità o autorizzazioni non necessarie. È completamente opensource, offre colori personalizzabili. From 368e64b13bd281ed550c8d4b0f86fb239aa63db2 Mon Sep 17 00:00:00 2001 From: FTno <16176811+FTno@users.noreply.github.com> Date: Sat, 30 Dec 2017 18:23:50 +0100 Subject: [PATCH 28/28] Update strings.xml Norwegian (nb) translation update --- app/src/main/res/values-nb/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 4b350e5ea..f6dce7699 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -44,9 +44,9 @@ Ekskludering av mapper vil gjøre dem sammen med deres undermapper, skjulte bare i denne appen. De vil fortsatt være synlige i andre apper.\n\nHvis du vil skjule dem fra andre apper, bruk Skjul-funksjonen. Fjern alle Fjerne alle mapper fra listen av ekskluderte? Dette sletter ikke mappene. - Hidden folders - Manage hidden folders - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + Skjulte mapper + Håndter skjulte mapper + Ser ut til at du ikke har skjult noen mapper med en \".nomedia\"-fil. Inkluderte mapper