diff --git a/CHANGELOG.md b/CHANGELOG.md index 375d504a6..d791cdf73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,31 @@ Changelog ========== +Version 3.5.2 *(2018-02-25)* +---------------------------- + + * Fixed third party intent uri generation + * Properly handle files with colon in filename + * Fix copying whole folders + +Version 3.5.1 *(2018-02-25)* +---------------------------- + + * Added a toggle for disabling pull-to-refresh + * Added a toggle for permanent Delete confirmation dialog skipping + * Fixed saving image after editing + +Version 3.5.0 *(2018-02-20)* +---------------------------- + + * Added copy/move progress notification + * Fixed some glitches a round rotating media by aspect ratio + * Added FAQ + * Make explicit folder inclusion recursive + * Added initial OTG device support + * Rewrote third party intent handling and file handling, fixed some bugs along the way + * Probably added some new bugs + Version 3.4.1 *(2018-02-09)* ---------------------------- diff --git a/app/build.gradle b/app/build.gradle index b02036847..143dea1d4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId "com.simplemobiletools.gallery" minSdkVersion 16 targetSdkVersion 27 - versionCode 161 - versionName "3.4.1" + versionCode 164 + versionName "3.5.2" multiDexEnabled true setProperty("archivesBaseName", "gallery") } @@ -46,7 +46,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.11.1' + implementation 'com.simplemobiletools:commons:3.13.8' 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' @@ -55,7 +55,7 @@ dependencies { implementation 'com.github.chrisbanes:PhotoView:2.1.3' //implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0' - implementation 'com.github.tibbi:subsampling-scale-image-view:v3.9.0.1-fork' + implementation 'com.github.tibbi:subsampling-scale-image-view:v3.9.0.6-fork' debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8eead3683..b4915161f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -98,6 +98,11 @@ android:label="@string/customize_colors" android:parentActivityName=".activities.SettingsActivity"/> + + { + val realPath = intent.extras.getString(REAL_FILE_PATH) + if (realPath.startsWith(OTG_PATH)) { + Uri.parse(realPath) + } else { + Uri.fromFile(File(realPath)) + } + } + intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true -> intent.extras!!.get(MediaStore.EXTRA_OUTPUT) as Uri + else -> uri } isCropIntent = intent.extras?.get(CROP) == "true" @@ -171,13 +181,15 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener saveBitmapToFile(result.bitmap, it) } } else if (saveUri.scheme == "content") { - val newPath = applicationContext.getRealPathFromURI(saveUri) ?: "" - if (!newPath.isEmpty()) { - SaveAsDialog(this, newPath, true) { - saveBitmapToFile(result.bitmap, it) - } - } else { - toast(R.string.image_editing_failed) + var newPath = applicationContext.getRealPathFromURI(saveUri) ?: "" + var shouldAppendFilename = true + if (newPath.isEmpty()) { + newPath = "$internalStoragePath/${getCurrentFormattedDateTime()}.${saveUri.toString().getFilenameExtension()}" + shouldAppendFilename = false + } + + SaveAsDialog(this, newPath, shouldAppendFilename) { + saveBitmapToFile(result.bitmap, it) } } else { toast(R.string.unknown_file_location) @@ -191,7 +203,8 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener try { Thread { val file = File(path) - getFileOutputStream(file) { + val fileDirItem = FileDirItem(path, path.getFilenameFromPath()) + getFileOutputStream(fileDirItem, true) { if (it != null) { saveBitmap(file, bitmap, it) } else { @@ -207,11 +220,12 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } private fun saveBitmap(file: File, bitmap: Bitmap, out: OutputStream) { + toast(R.string.saving) if (resizeWidth > 0 && resizeHeight > 0) { val resized = Bitmap.createScaledBitmap(bitmap, resizeWidth, resizeHeight, false) - resized.compress(file.getCompressionFormat(), 90, out) + resized.compress(file.absolutePath.getCompressionFormat(), 90, out) } else { - bitmap.compress(file.getCompressionFormat(), 90, out) + bitmap.compress(file.absolutePath.getCompressionFormat(), 90, out) } setResult(Activity.RESULT_OK, intent) scanFinalPath(file.absolutePath) @@ -227,7 +241,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } private fun editWith() { - openEditor(uri) + openEditor(uri.toString()) isEditingWithThirdParty = true } 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 3c59a8361..c4142ac5b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -5,6 +5,7 @@ import android.content.ClipData import android.content.Intent import android.net.Uri import android.os.Bundle +import android.os.Environment import android.os.Handler import android.provider.MediaStore import android.support.v7.widget.GridLayoutManager @@ -17,9 +18,11 @@ import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN +import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.models.Release import com.simplemobiletools.commons.views.MyGridLayoutManager @@ -95,6 +98,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } mIsPasswordProtectionPending = config.appPasswordProtectionOn + setupLatestMediaId() } override fun onStart() { @@ -133,6 +137,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { directories_horizontal_fastscroller.updateBubbleColors() directories_vertical_fastscroller.updateBubbleColors() + directories_refresh_layout.isEnabled = config.enablePullToRefresh invalidateOptionsMenu() directories_empty_text_label.setTextColor(config.textColor) directories_empty_text.setTextColor(getAdjustedPrimaryColor()) @@ -233,7 +238,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { val newFolder = File(config.tempFolderPath) if (newFolder.exists() && newFolder.isDirectory) { if (newFolder.list()?.isEmpty() == true) { - deleteFile(newFolder, true) + deleteFile(newFolder.toFileDirItem(applicationContext), true) } } config.tempFolderPath = "" @@ -280,6 +285,17 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { gotDirectories(addTempFolderIfNeeded(it), false) } mCurrAsyncTask!!.execute() + + // try ensuring that the screenshots folders is properly added to the mediastore + if (config.appRunCount < 5) { + Thread { + val pictures = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + val screenshots = File(pictures, "Screenshots") + if (screenshots.exists()) { + scanFile(screenshots) + } + }.start() + } } private fun showSortingDialog() { @@ -352,7 +368,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } override fun deleteFolders(folders: ArrayList) { - deleteFolders(folders) { + val fileDirItems = folders.map { FileDirItem(it.absolutePath, it.name, true) } as ArrayList + deleteFolders(fileDirItems) { runOnUiThread { refreshItems() } @@ -522,7 +539,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private fun fillIntentPath(resultData: Intent, resultIntent: Intent) { val path = resultData.data.path val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID) - val type = path.getMimeTypeFromPath() + val type = path.getMimeType() resultIntent.setDataAndTypeAndNormalize(uri, type) resultIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) } @@ -551,9 +568,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private fun gotDirectories(newDirs: ArrayList, isFromCache: Boolean) { if (!isFromCache) { - Thread { - mLatestMediaId = getLatestMediaId() - }.start() + setupLatestMediaId() } val dirs = getSortedDirectories(newDirs) @@ -608,7 +623,6 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private fun setupScrollDirection() { val allowHorizontalScroll = config.scrollHorizontally && config.viewTypeFolders == VIEW_TYPE_GRID - directories_refresh_layout.isEnabled = !config.scrollHorizontally directories_vertical_fastscroller.isHorizontal = false directories_vertical_fastscroller.beGoneIf(allowHorizontalScroll) @@ -619,19 +633,30 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { if (allowHorizontalScroll) { directories_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble directories_horizontal_fastscroller.setViews(directories_grid, directories_refresh_layout) { - directories_horizontal_fastscroller.updateBubbleText(mDirs[it].getBubbleText()) + directories_horizontal_fastscroller.updateBubbleText(getBubbleTextItem(it)) } } else { directories_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble directories_vertical_fastscroller.setViews(directories_grid, directories_refresh_layout) { - directories_vertical_fastscroller.updateBubbleText(mDirs[it].getBubbleText()) + directories_vertical_fastscroller.updateBubbleText(getBubbleTextItem(it)) } } } + private fun getBubbleTextItem(index: Int) = getRecyclerAdapter().dirs.getOrNull(index)?.getBubbleText() ?: "" + + private fun setupLatestMediaId() { + Thread { + if (hasPermission(PERMISSION_READ_STORAGE)) { + mLatestMediaId = getLatestMediaId() + } + }.start() + } + private fun checkLastMediaChanged() { - if (isActivityDestroyed()) + if (isActivityDestroyed()) { return + } mLastMediaHandler.removeCallbacksAndMessages(null) mLastMediaHandler.postDelayed({ @@ -701,6 +726,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { add(Release(143, R.string.release_143)) add(Release(158, R.string.release_158)) add(Release(159, R.string.release_159)) + add(Release(163, R.string.release_163)) checkWhatsNew(this, BuildConfig.VERSION_CODE) } } 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 82d8990ad..5b5d07f84 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -24,8 +24,10 @@ import com.google.gson.Gson import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.OTG_PATH import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.REQUEST_EDIT_IMAGE +import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.views.MyGridLayoutManager import com.simplemobiletools.commons.views.MyRecyclerView @@ -132,6 +134,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { media_horizontal_fastscroller.updateBubbleColors() media_vertical_fastscroller.updateBubbleColors() + media_refresh_layout.isEnabled = config.enablePullToRefresh tryloadGallery() invalidateOptionsMenu() media_empty_text_label.setTextColor(config.textColor) @@ -277,7 +280,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private fun tryloadGallery() { handlePermission(PERMISSION_WRITE_STORAGE) { if (it) { - val dirName = getHumanizedFilename(mPath) + val dirName = when { + mPath == OTG_PATH -> getString(R.string.otg) + mPath.startsWith(OTG_PATH) -> mPath.trimEnd('/').substringAfterLast('/') + else -> getHumanizedFilename(mPath) + } supportActionBar?.title = if (mShowAll) resources.getString(R.string.all_folders) else dirName getMedia() setupLayoutManager() @@ -323,8 +330,6 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private fun setupScrollDirection() { val allowHorizontalScroll = config.scrollHorizontally && config.viewTypeFiles == VIEW_TYPE_GRID - media_refresh_layout.isEnabled = !config.scrollHorizontally - media_vertical_fastscroller.isHorizontal = false media_vertical_fastscroller.beGoneIf(allowHorizontalScroll) @@ -334,16 +339,18 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { if (allowHorizontalScroll) { media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble media_horizontal_fastscroller.setViews(media_grid, media_refresh_layout) { - media_horizontal_fastscroller.updateBubbleText(mMedia[it].getBubbleText()) + media_horizontal_fastscroller.updateBubbleText(getBubbleTextItem(it)) } } else { media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble media_vertical_fastscroller.setViews(media_grid, media_refresh_layout) { - media_vertical_fastscroller.updateBubbleText(mMedia[it].getBubbleText()) + media_vertical_fastscroller.updateBubbleText(getBubbleTextItem(it)) } } } + private fun getBubbleTextItem(index: Int) = getRecyclerAdapter().media.getOrNull(index)?.getBubbleText() ?: "" + private fun checkLastMediaChanged() { if (isActivityDestroyed()) return @@ -417,10 +424,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private fun hideFolder() { addNoMedia(mPath) { runOnUiThread { - if (!config.shouldShowHidden) + if (!config.shouldShowHidden) { finish() - else + } else { invalidateOptionsMenu() + } } } } @@ -440,9 +448,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } private fun deleteDirectoryIfEmpty() { - val file = File(mPath) - if (config.deleteEmptyFolders && !file.isDownloadsFolder() && file.isDirectory && file.list()?.isEmpty() == true) { - deleteFile(file, true) + val fileDirItem = FileDirItem(mPath, mPath.getFilenameFromPath()) + if (config.deleteEmptyFolders && !fileDirItem.isDownloadsFolder() && fileDirItem.isDirectory && fileDirItem.getProperFileCount(applicationContext, true) == 0) { + deleteFile(fileDirItem, true) } } @@ -608,10 +616,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } finish() } else { - val file = File(path) - val isVideo = file.isVideoFast() + val isVideo = path.isVideoFast() if (isVideo) { - openFile(Uri.fromFile(file), false) + openPath(path, false) } else { Intent(this, ViewPagerActivity::class.java).apply { putExtra(PATH, path) @@ -664,8 +671,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } } - override fun deleteFiles(files: ArrayList) { - val filtered = files.filter { it.isImageVideoGif() } as ArrayList + override fun deleteFiles(fileDirItems: ArrayList) { + val filtered = fileDirItems.filter { it.path.isImageVideoGif() } as ArrayList deleteFiles(filtered) { if (!it) { toast(R.string.unknown_error_occurred) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index 602154896..f3c4084bd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -59,11 +59,13 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList private fun checkIntent(savedInstanceState: Bundle? = null) { mUri = intent.data ?: return if (intent.extras?.containsKey(REAL_FILE_PATH) == true) { - mUri = intent.extras.get(REAL_FILE_PATH) as Uri + val realPath = intent.extras.getString(REAL_FILE_PATH) + sendViewPagerIntent(realPath) + finish() + return } mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false) - if (mUri!!.scheme == "file") { scanPath(mUri!!.path) sendViewPagerIntent(mUri!!.path) @@ -131,14 +133,15 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList } override fun onOptionsItemSelected(item: MenuItem): Boolean { - if (mMedium == null) + if (mMedium == null) { return true + } when (item.itemId) { - R.id.menu_set_as -> setAs(mUri!!) - R.id.menu_open_with -> openFile(mUri!!, true) - R.id.menu_share -> shareUri(mUri!!) - R.id.menu_edit -> openEditor(mUri!!) + R.id.menu_set_as -> setAs(mUri!!.toString()) + R.id.menu_open_with -> openPath(mUri!!.toString(), true) + R.id.menu_share -> sharePath(mUri!!.toString()) + R.id.menu_edit -> openEditor(mUri!!.toString()) R.id.menu_properties -> showProperties() else -> return super.onOptionsItemSelected(item) } 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 4d16a3980..0930d4463 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -57,12 +57,14 @@ class SettingsActivity : SimpleActivity() { setupShowMediaCount() setupKeepLastModified() setupShowInfoBubble() + setupEnablePullToRefresh() setupOneFingerZoom() setupAllowInstantChange() setupReplaceZoomableImages() setupShowExtendedDetails() setupHideExtendedDetails() setupManageExtendedDetails() + setupSkipDeleteConfirmation() updateTextColors(settings_holder) setupSectionColors() } @@ -309,6 +311,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupEnablePullToRefresh() { + settings_enable_pull_to_refresh.isChecked = config.enablePullToRefresh + settings_enable_pull_to_refresh_holder.setOnClickListener { + settings_enable_pull_to_refresh.toggle() + config.enablePullToRefresh = settings_enable_pull_to_refresh.isChecked + } + } + private fun setupOneFingerZoom() { settings_one_finger_zoom.isChecked = config.oneFingerZoom settings_one_finger_zoom_holder.setOnClickListener { @@ -363,6 +373,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupSkipDeleteConfirmation() { + settings_skip_delete_confirmation.isChecked = config.skipDeleteConfirmation + settings_skip_delete_confirmation_holder.setOnClickListener { + settings_skip_delete_confirmation.toggle() + config.skipDeleteConfirmation = settings_skip_delete_confirmation.isChecked + } + } + private fun setupScreenRotation() { settings_screen_rotation.text = getScreenRotationText() settings_screen_rotation_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 80e41d7c5..605565680 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -29,10 +29,8 @@ import com.bumptech.glide.Glide import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.dialogs.RenameItemDialog import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.IS_FROM_GALLERY -import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE -import com.simplemobiletools.commons.helpers.REQUEST_EDIT_IMAGE -import com.simplemobiletools.commons.helpers.REQUEST_SET_AS +import com.simplemobiletools.commons.helpers.* +import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.adapters.MyPagerAdapter import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask @@ -174,16 +172,19 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } } + if (intent.extras?.containsKey(REAL_FILE_PATH) == true) { + mPath = intent.extras.getString(REAL_FILE_PATH) + } + if (mPath.isEmpty()) { toast(R.string.unknown_error_occurred) finish() return } - val file = File(mPath) - if (!file.exists() && file.length() == 0L) { + if (!getDoesFilePathExist(mPath)) { Thread { - deleteFromMediaStore(file) + scanPath(mPath) }.start() finish() return @@ -201,7 +202,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View showSystemUI() - mDirectory = file.parent + mDirectory = mPath.getParentPath().trimEnd('/') + if (mDirectory.startsWith(OTG_PATH.trimEnd('/'))) { + mDirectory += "/" + } supportActionBar?.title = mPath.getFilenameFromPath() view_pager.onGlobalLayout { @@ -272,18 +276,18 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View return true when (item.itemId) { - R.id.menu_set_as -> setAs(Uri.fromFile(getCurrentFile())) + R.id.menu_set_as -> setAs(getCurrentPath()) R.id.menu_slideshow -> initSlideshow() R.id.menu_copy_to -> copyMoveTo(true) R.id.menu_move_to -> copyMoveTo(false) - R.id.menu_open_with -> openFile(Uri.fromFile(getCurrentFile()), true) + R.id.menu_open_with -> openPath(getCurrentPath(), true) R.id.menu_hide -> toggleFileVisibility(true) R.id.menu_unhide -> toggleFileVisibility(false) R.id.menu_share_1 -> shareMedium(getCurrentMedium()!!) R.id.menu_share_2 -> shareMedium(getCurrentMedium()!!) R.id.menu_delete -> checkDeleteConfirmation() R.id.menu_rename -> renameFile() - R.id.menu_edit -> openEditor(Uri.fromFile(getCurrentFile())) + R.id.menu_edit -> openEditor(getCurrentPath()) R.id.menu_properties -> showProperties() R.id.menu_show_on_map -> showOnMap() R.id.menu_rotate_right -> rotateImage(90) @@ -462,8 +466,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun copyMoveTo(isCopyOperation: Boolean) { - val files = ArrayList(1).apply { add(getCurrentFile()) } - tryCopyMoveFilesTo(files, isCopyOperation) { + val currPath = getCurrentPath() + val fileDirItems = arrayListOf(FileDirItem(currPath, currPath.getFilenameFromPath())) + tryCopyMoveFilesTo(fileDirItems, isCopyOperation) { config.tempFolderPath = "" if (!isCopyOperation) { refreshViewPager() @@ -472,13 +477,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun toggleFileVisibility(hide: Boolean) { - toggleFileVisibility(getCurrentFile(), hide) { - val newFileName = it.absolutePath.getFilenameFromPath() + toggleFileVisibility(getCurrentPath(), hide) { + val newFileName = it.getFilenameFromPath() supportActionBar?.title = newFileName getCurrentMedium()!!.apply { name = newFileName - path = it.absolutePath + path = it getCurrentMedia()[mPos] = this } invalidateOptionsMenu() @@ -508,8 +513,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun saveImageAs() { val currPath = getCurrentPath() SaveAsDialog(this, currPath, false) { - val selectedFile = File(it) - handleSAFDialog(selectedFile) { + handleSAFDialog(it) { Thread { saveImageToFile(currPath, it) }.start() @@ -523,7 +527,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View val tmpFile = File(filesDir, ".tmp_${newPath.getFilenameFromPath()}") try { val bitmap = BitmapFactory.decodeFile(oldPath) - getFileOutputStream(tmpFile) { + getFileOutputStream(tmpFile.toFileDirItem(applicationContext)) { if (it == null) { toast(R.string.unknown_error_occurred) return@getFileOutputStream @@ -536,16 +540,16 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View saveFile(tmpFile, bitmap, it as FileOutputStream) } - if (tmpFile.length() > 0 && newFile.exists()) { - deleteFile(newFile) + if (tmpFile.length() > 0 && getDoesFilePathExist(newPath)) { + deleteFile(FileDirItem(newPath, newPath.getFilenameFromPath())) } copyFile(tmpFile, newFile) - scanFile(newFile) + scanPath(newPath) toast(R.string.file_saved) if (config.keepLastModified) { newFile.setLastModified(oldLastModified) - updateLastModified(newFile, oldLastModified) + updateLastModified(newPath, oldLastModified) } it.flush() @@ -565,7 +569,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } catch (e: Exception) { showErrorToast(e) } finally { - deleteFile(tmpFile) + deleteFile(FileDirItem(tmpFile.absolutePath, tmpFile.absolutePath.getFilenameFromPath())) } } @@ -573,7 +577,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View var inputStream: InputStream? = null var out: OutputStream? = null try { - val fileDocument = if (isPathOnSD(destination.absolutePath)) getFileDocument(destination.parent) else null + val fileDocument = if (isPathOnSD(destination.absolutePath)) getDocumentFile(destination.parent) else null out = getFileOutputStreamSync(destination.absolutePath, source.getMimeType(), fileDocument) inputStream = FileInputStream(source) inputStream.copyTo(out!!) @@ -587,7 +591,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View val matrix = Matrix() matrix.postRotate(mRotationDegrees) val bmp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true) - bmp.compress(file.getCompressionFormat(), 90, out) + bmp.compress(file.absolutePath.getCompressionFormat(), 90, out) } private fun saveRotation(source: File, destination: File) { @@ -709,6 +713,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View if (requestCode == REQUEST_EDIT_IMAGE) { if (resultCode == Activity.RESULT_OK && resultData != null) { mPos = -1 + mPrevHashcode = 0 refreshViewPager() } } else if (requestCode == REQUEST_SET_AS) { @@ -720,7 +725,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun checkDeleteConfirmation() { - if (mSkipConfirmationDialog) { + if (mSkipConfirmationDialog || config.skipDeleteConfirmation) { deleteConfirmed() } else { askConfirmDelete() @@ -735,7 +740,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun deleteConfirmed() { - deleteFile(File(getCurrentMedia()[mPos].path)) { + val path = getCurrentMedia()[mPos].path + deleteFile(FileDirItem(path, path.getFilenameFromPath())) { refreshViewPager() } } @@ -811,9 +817,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun deleteDirectoryIfEmpty() { - val file = File(mDirectory) - if (config.deleteEmptyFolders && !file.isDownloadsFolder() && file.isDirectory && file.list()?.isEmpty() == true) { - deleteFile(file, true) + val fileDirItem = FileDirItem(mDirectory, mDirectory.getFilenameFromPath(), getIsPathDirectory(mDirectory)) + if (config.deleteEmptyFolders && !fileDirItem.isDownloadsFolder() && fileDirItem.isDirectory && fileDirItem.getProperFileCount(applicationContext, true) == 0) { + deleteFile(fileDirItem, true) } scanPath(mDirectory) @@ -821,10 +827,20 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun checkOrientation() { if (!mIsOrientationLocked && config.screenRotation == ROTATE_BY_ASPECT_RATIO) { - val res = getCurrentFile().getResolution() - if (res.x > res.y) { + var flipSides = false + try { + val pathToLoad = getCurrentPath() + val exif = android.media.ExifInterface(pathToLoad) + val orientation = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, -1) + flipSides = orientation == ExifInterface.ORIENTATION_ROTATE_90 || orientation == ExifInterface.ORIENTATION_ROTATE_270 + } catch (e: Exception) { + } + val res = getCurrentPath().getResolution() ?: return + val width = if (flipSides) res.y else res.x + val height = if (flipSides) res.x else res.y + if (width > height) { requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE - } else if (res.x < res.y) { + } else if (width < height) { requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT } } @@ -844,10 +860,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View override fun goToPrevItem() { view_pager.setCurrentItem(view_pager.currentItem - 1, false) + checkOrientation() } override fun goToNextItem() { view_pager.setCurrentItem(view_pager.currentItem + 1, false) + checkOrientation() } private fun checkSystemUI() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index f6efe8972..a795756e5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -11,6 +11,7 @@ import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.dialogs.RenameItemDialog import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.views.FastScroller import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.gallery.R @@ -76,6 +77,10 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList showProperties() R.id.cab_rename -> renameDir() @@ -213,16 +218,14 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList() + val paths = ArrayList() selectedPositions.forEach { val dir = File(dirs[it].path) - files.addAll(dir.listFiles().filter { it.isFile && it.isImageVideoGif() }) + paths.addAll(dir.listFiles().filter { !activity.getIsPathDirectory(it.absolutePath) && it.absolutePath.isImageVideoGif() }.map { it.absolutePath }) } - activity.tryCopyMoveFilesTo(files, isCopyOperation) { + val fileDirItems = paths.map { FileDirItem(it, it.getFilenameFromPath()) } as ArrayList + activity.tryCopyMoveFilesTo(fileDirItems, isCopyOperation) { config.tempFolderPath = "" listener?.refreshItems() finishActMode() @@ -230,8 +233,12 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList, val listener: RefreshRecyclerViewListener?, @@ -70,7 +69,7 @@ class ManageHiddenFoldersAdapter(activity: BaseSimpleActivity, var folders: Arra } if (sdCardPaths.isNotEmpty()) { - activity.handleSAFDialog(File(sdCardPaths.first())) { + activity.handleSAFDialog(sdCardPaths.first()) { unhideFolders(removeFolders) } } else { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index e54fd102c..7b6477894 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -1,6 +1,5 @@ package com.simplemobiletools.gallery.adapters -import android.net.Uri import android.os.Handler import android.os.Looper import android.view.Menu @@ -11,9 +10,9 @@ import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.dialogs.RenameItemDialog -import com.simplemobiletools.commons.extensions.applyColorFilter -import com.simplemobiletools.commons.extensions.beVisibleIf -import com.simplemobiletools.commons.extensions.isActivityDestroyed +import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.OTG_PATH +import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.views.FastScroller import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.gallery.R @@ -22,8 +21,6 @@ import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.helpers.VIEW_TYPE_LIST import com.simplemobiletools.gallery.models.Medium import kotlinx.android.synthetic.main.photo_video_item_grid.view.* -import java.io.File -import java.util.* class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, val listener: MediaOperationsListener?, val isAGetIntent: Boolean, val allowMultiplePicks: Boolean, recyclerView: MyRecyclerView, fastScroller: FastScroller? = null, @@ -39,6 +36,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, private var loadImageInstantly = false private var delayHandler = Handler(Looper.getMainLooper()) private var currentMediaHash = media.hashCode() + private val hasOTGConnected = activity.hasOTGConnected() private var scrollHorizontally = config.scrollHorizontally private var animateGifs = config.animateGifs @@ -86,6 +84,10 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } override fun actionItemPressed(id: Int) { + if (selectedPositions.isEmpty()) { + return + } + when (id) { R.id.cab_confirm_selection -> confirmSelection() R.id.cab_properties -> showProperties() @@ -97,8 +99,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, R.id.cab_copy_to -> copyMoveTo(true) R.id.cab_move_to -> copyMoveTo(false) R.id.cab_select_all -> selectAll() - R.id.cab_open_with -> activity.openFile(Uri.fromFile(getCurrentFile()), true) - R.id.cab_set_as -> activity.setAs(Uri.fromFile(getCurrentFile())) + R.id.cab_open_with -> activity.openPath(getCurrentPath(), true) + R.id.cab_set_as -> activity.setAs(getCurrentPath()) R.id.cab_delete -> checkDeleteConfirmation() } } @@ -145,7 +147,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } private fun renameFile() { - RenameItemDialog(activity, getCurrentFile().absolutePath) { + RenameItemDialog(activity, getCurrentPath()) { activity.runOnUiThread { listener?.refreshItems() finishActMode() @@ -154,15 +156,14 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } private fun editFile() { - activity.openEditor(Uri.fromFile(getCurrentFile())) + activity.openEditor(getCurrentPath()) finishActMode() } private fun toggleFileVisibility(hide: Boolean) { Thread { getSelectedMedia().forEach { - val oldFile = File(it.path) - activity.toggleFileVisibility(oldFile, hide) + activity.toggleFileVisibility(it.path, hide) } activity.runOnUiThread { listener?.refreshItems() @@ -180,21 +181,21 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } private fun copyMoveTo(isCopyOperation: Boolean) { - val files = ArrayList() - selectedPositions.forEach { files.add(File(media[it].path)) } + val paths = ArrayList() + selectedPositions.forEach { paths.add(media[it].path) } - activity.tryCopyMoveFilesTo(files, isCopyOperation) { + val fileDirItems = paths.map { FileDirItem(it, it.getFilenameFromPath()) } as ArrayList + activity.tryCopyMoveFilesTo(fileDirItems, isCopyOperation) { config.tempFolderPath = "" if (!isCopyOperation) { listener?.refreshItems() } - finishActMode() } } private fun checkDeleteConfirmation() { - if (skipConfirmationDialog) { - deleteConfirmed() + if (skipConfirmationDialog || config.skipDeleteConfirmation) { + deleteFiles() } else { askConfirmDelete() } @@ -203,22 +204,18 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, private fun askConfirmDelete() { DeleteWithRememberDialog(activity) { skipConfirmationDialog = it - deleteConfirmed() + deleteFiles() } } - private fun deleteConfirmed() { - deleteFiles() - } - - private fun getCurrentFile() = File(media[selectedPositions.first()].path) + private fun getCurrentPath() = media[selectedPositions.first()].path private fun deleteFiles() { if (selectedPositions.isEmpty()) { return } - val files = ArrayList(selectedPositions.size) + val fileDirItems = ArrayList(selectedPositions.size) val removeMedia = ArrayList(selectedPositions.size) if (media.size <= selectedPositions.first()) { @@ -227,15 +224,15 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } val SAFPath = media[selectedPositions.first()].path - activity.handleSAFDialog(File(SAFPath)) { + activity.handleSAFDialog(SAFPath) { selectedPositions.sortedDescending().forEach { val medium = media[it] - files.add(File(medium.path)) + fileDirItems.add(FileDirItem(medium.path, medium.name)) removeMedia.add(medium) } media.removeAll(removeMedia) - listener?.deleteFiles(files) + listener?.deleteFiles(fileDirItems) removeSelectedItems() } } @@ -291,15 +288,20 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, photo_name.text = medium.name photo_name.tag = medium.path + var thumbnailPath = medium.path + if (hasOTGConnected && thumbnailPath.startsWith(OTG_PATH)) { + thumbnailPath = thumbnailPath.getOTGPublicPath(context) + } + if (loadImageInstantly) { - activity.loadImage(medium.type, medium.path, medium_thumbnail, scrollHorizontally, animateGifs, cropThumbnails) + activity.loadImage(medium.type, thumbnailPath, medium_thumbnail, scrollHorizontally, animateGifs, cropThumbnails) } else { medium_thumbnail.setImageDrawable(null) medium_thumbnail.isHorizontalScrolling = scrollHorizontally delayHandler.postDelayed({ val isVisible = visibleItemPaths.contains(medium.path) if (isVisible) { - activity.loadImage(medium.type, medium.path, medium_thumbnail, scrollHorizontally, animateGifs, cropThumbnails) + activity.loadImage(medium.type, thumbnailPath, medium_thumbnail, scrollHorizontally, animateGifs, cropThumbnails) } }, IMAGE_LOAD_DELAY) } @@ -314,7 +316,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, interface MediaOperationsListener { fun refreshItems() - fun deleteFiles(files: ArrayList) + fun deleteFiles(fileDirItems: ArrayList) fun selectedPaths(paths: ArrayList) } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt index b6c6bae21..e4ee2ee21 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt @@ -3,11 +3,12 @@ package com.simplemobiletools.gallery.asynctasks import android.content.Context import android.os.AsyncTask import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.OTG_PATH import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.SORT_DESCENDING import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.extensions.config -import com.simplemobiletools.gallery.extensions.containsNoMedia +import com.simplemobiletools.gallery.extensions.doesParentHaveNoMedia import com.simplemobiletools.gallery.extensions.sumByLong import com.simplemobiletools.gallery.helpers.MediaFetcher import com.simplemobiletools.gallery.models.Directory @@ -28,16 +29,22 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va val directories = ArrayList() val hidden = context.resources.getString(R.string.hidden) val albumCovers = config.parseAlbumCovers() + val hasOTG = context.hasOTGConnected() && context.config.OTGBasePath.isNotEmpty() + for ((path, curMedia) in groupedMedia) { Medium.sorting = config.getFileSorting(path) curMedia.sort() val firstItem = curMedia.first() val lastItem = curMedia.last() - val parentDir = File(firstItem.path).parent - var thumbnail = firstItem.path + val parentDir = if (hasOTG && firstItem.path.startsWith(OTG_PATH)) firstItem.path.getParentPath() else File(firstItem.path).parent + var thumbnail = curMedia.firstOrNull { context.getDoesFilePathExist(it.path) }?.path ?: "" + if (thumbnail.startsWith(OTG_PATH)) { + thumbnail = thumbnail.getOTGPublicPath(context) + } + albumCovers.forEach { - if (it.path == parentDir && File(it.tmb).exists()) { + if (it.path == parentDir && context.getDoesFilePathExist(it.tmb)) { thumbnail = it.tmb } } @@ -45,10 +52,17 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va var dirName = when (parentDir) { context.internalStoragePath -> context.getString(R.string.internal) context.sdCardPath -> context.getString(R.string.sd_card) - else -> parentDir.getFilenameFromPath() + OTG_PATH -> context.getString(R.string.otg) + else -> { + if (parentDir.startsWith(OTG_PATH)) { + parentDir.trimEnd('/').substringAfterLast('/') + } else { + parentDir.getFilenameFromPath() + } + } } - if (File(parentDir).containsNoMedia()) { + if (File(parentDir).doesParentHaveNoMedia()) { dirName += " $hidden" } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt index a3b8a2b5d..ff9d6230d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt @@ -25,7 +25,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo media.sort() media } else { - mediaFetcher.getFilesFrom(mPath, isPickImage, isPickVideo) + mediaFetcher.getFilesFrom(mPath, isPickImage, isPickVideo, false) } } 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 d83d10237..efbf4fe0e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt @@ -81,7 +81,7 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorti config.saveFileSorting(path, sorting) } else { config.removeFileSorting(path) - config.fileSorting = sorting + config.sorting = sorting } } callback() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt index 792ede406..201de45dd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt @@ -13,7 +13,8 @@ import java.io.File class SaveAsDialog(val activity: BaseSimpleActivity, val path: String, val appendFilename: Boolean, val callback: (savePath: String) -> Unit) { init { - var realPath = File(path).parent.trimEnd('/') + var realPath = path.getParentPath().trimEnd('/') + val view = activity.layoutInflater.inflate(R.layout.dialog_save_as, null).apply { save_as_path.text = activity.humanizePath(realPath) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt index 3103a84a9..87a1b6971 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -2,7 +2,6 @@ package com.simplemobiletools.gallery.extensions import android.app.Activity import android.content.Intent -import android.net.Uri import android.provider.MediaStore import android.support.v7.app.AppCompatActivity import android.view.View @@ -17,6 +16,8 @@ import com.google.gson.reflect.TypeToken import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* +import com.simplemobiletools.commons.models.FAQItem +import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.gallery.BuildConfig import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.SimpleActivity @@ -32,34 +33,33 @@ import pl.droidsonroids.gif.GifDrawable import java.io.File import java.util.* -fun Activity.shareUri(uri: Uri) { - shareUri(uri, BuildConfig.APPLICATION_ID) +fun Activity.sharePath(path: String) { + sharePathIntent(path, BuildConfig.APPLICATION_ID) } -fun Activity.shareUris(uris: ArrayList) { - shareUris(uris, BuildConfig.APPLICATION_ID) +fun Activity.sharePaths(paths: ArrayList) { + sharePathsIntent(paths, BuildConfig.APPLICATION_ID) } fun Activity.shareMedium(medium: Medium) { - val file = File(medium.path) - shareUri(Uri.fromFile(file)) + sharePath(medium.path) } fun Activity.shareMedia(media: List) { - val uris = media.map { Uri.fromFile(File(it.path)) } as ArrayList - shareUris(uris) + val paths = media.map { it.path } as ArrayList + sharePaths(paths) } -fun Activity.setAs(uri: Uri) { - setAs(uri, BuildConfig.APPLICATION_ID) +fun Activity.setAs(path: String) { + setAsIntent(path, BuildConfig.APPLICATION_ID) } -fun Activity.openFile(uri: Uri, forceChooser: Boolean) { - openFile(uri, forceChooser, BuildConfig.APPLICATION_ID) +fun Activity.openPath(path: String, forceChooser: Boolean) { + openPathIntent(path, forceChooser, BuildConfig.APPLICATION_ID) } -fun Activity.openEditor(uri: Uri) { - openEditor(uri, BuildConfig.APPLICATION_ID) +fun Activity.openEditor(path: String) { + openEditorIntent(path, BuildConfig.APPLICATION_ID) } fun Activity.launchCamera() { @@ -72,8 +72,21 @@ fun Activity.launchCamera() { } fun SimpleActivity.launchAbout() { + val faqItems = arrayListOf( + FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons), + FAQItem(R.string.faq_3_title_commons, R.string.faq_3_text_commons), + FAQItem(R.string.faq_1_title, R.string.faq_1_text), + FAQItem(R.string.faq_2_title, R.string.faq_2_text), + FAQItem(R.string.faq_3_title, R.string.faq_3_text), + FAQItem(R.string.faq_4_title, R.string.faq_4_text), + FAQItem(R.string.faq_5_title, R.string.faq_5_text), + FAQItem(R.string.faq_6_title, R.string.faq_6_text), + FAQItem(R.string.faq_7_title, R.string.faq_7_text), + FAQItem(R.string.faq_8_title, R.string.faq_8_text), + FAQItem(R.string.faq_9_title, R.string.faq_9_text)) + startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_MULTISELECT or LICENSE_RTL - or LICENSE_SUBSAMPLING or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GIF_DRAWABLE or LICENSE_PHOTOVIEW, BuildConfig.VERSION_NAME) + or LICENSE_SUBSAMPLING or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GIF_DRAWABLE or LICENSE_PHOTOVIEW, BuildConfig.VERSION_NAME, faqItems) } fun AppCompatActivity.showSystemUI() { @@ -100,8 +113,8 @@ fun BaseSimpleActivity.addNoMedia(path: String, callback: () -> Unit) { return if (needsStupidWritePermissions(path)) { - handleSAFDialog(file) { - val fileDocument = getFileDocument(path) + handleSAFDialog(file.absolutePath) { + val fileDocument = getDocumentFile(path) if (fileDocument?.exists() == true && fileDocument.isDirectory) { fileDocument.createFile("", NOMEDIA) } else { @@ -123,22 +136,23 @@ fun BaseSimpleActivity.addNoMedia(path: String, callback: () -> Unit) { fun BaseSimpleActivity.removeNoMedia(path: String, callback: (() -> Unit)? = null) { val file = File(path, NOMEDIA) - deleteFile(file) { + deleteFile(file.toFileDirItem(applicationContext)) { callback?.invoke() } } -fun BaseSimpleActivity.toggleFileVisibility(oldFile: File, hide: Boolean, callback: ((newFile: File) -> Unit)? = null) { - val path = oldFile.parent - var filename = oldFile.name +fun BaseSimpleActivity.toggleFileVisibility(oldPath: String, hide: Boolean, callback: ((newPath: String) -> Unit)? = null) { + val path = oldPath.getParentPath() + var filename = oldPath.getFilenameFromPath() filename = if (hide) { ".${filename.trimStart('.')}" } else { filename.substring(1, filename.length) } - val newFile = File(path, filename) - renameFile(oldFile, newFile) { - callback?.invoke(newFile) + + val newPath = "$path/$filename" + renameFile(oldPath, newPath) { + callback?.invoke(newPath) } } @@ -169,15 +183,15 @@ fun Activity.loadImage(type: Int, path: String, target: MySquareImageView, horiz } } -fun BaseSimpleActivity.tryCopyMoveFilesTo(files: ArrayList, isCopyOperation: Boolean, callback: () -> Unit) { - if (files.isEmpty()) { +fun BaseSimpleActivity.tryCopyMoveFilesTo(fileDirItems: ArrayList, isCopyOperation: Boolean, callback: () -> Unit) { + if (fileDirItems.isEmpty()) { toast(R.string.unknown_error_occurred) return } - val source = if (files[0].isFile) files[0].parent else files[0].absolutePath + val source = fileDirItems[0].getParentPath() PickDirectoryDialog(this, source) { - copyMoveFilesTo(files, source.trimEnd('/'), it, isCopyOperation, true, callback) + copyMoveFilesTo(fileDirItems, source.trimEnd('/'), it, isCopyOperation, true, config.shouldShowHidden, callback) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/File.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/File.kt index 668c3acb5..df5aaf241 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/File.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/File.kt @@ -1,9 +1,20 @@ package com.simplemobiletools.gallery.extensions -import android.os.Environment import com.simplemobiletools.gallery.helpers.NOMEDIA import java.io.File fun File.containsNoMedia() = isDirectory && File(this, NOMEDIA).exists() -fun File.isDownloadsFolder() = absolutePath == Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString() +fun File.doesParentHaveNoMedia(): Boolean { + var curFile = this + while (true) { + if (curFile.containsNoMedia()) { + return true + } + curFile = curFile.parentFile + if (curFile.absolutePath == "/") { + break + } + } + return false +} diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/FileDirItem.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/FileDirItem.kt new file mode 100644 index 000000000..b882a9bb7 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/FileDirItem.kt @@ -0,0 +1,6 @@ +package com.simplemobiletools.gallery.extensions + +import android.os.Environment +import com.simplemobiletools.commons.models.FileDirItem + +fun FileDirItem.isDownloadsFolder() = path == Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString() 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 18a2d23a3..8a5a3560e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -24,12 +24,14 @@ import com.bumptech.glide.request.target.Target import com.davemorrissey.labs.subscaleview.ImageSource import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.OTG_PATH import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.PhotoActivity import com.simplemobiletools.gallery.activities.ViewPagerActivity import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.helpers.GlideRotateTransformation import com.simplemobiletools.gallery.helpers.MEDIUM +import com.simplemobiletools.gallery.helpers.ROTATE_BY_ASPECT_RATIO import com.simplemobiletools.gallery.models.Medium import it.sephiroth.android.library.exif2.ExifInterface import kotlinx.android.synthetic.main.pager_photo_item.view.* @@ -204,10 +206,11 @@ class PhotoFragment : ViewPagerFragment() { private fun loadGif() { try { - gifDrawable = if (medium.path.startsWith("content://") || medium.path.startsWith("file://")) { - GifDrawable(context!!.contentResolver, Uri.parse(medium.path)) + val pathToLoad = getPathToLoad(medium) + gifDrawable = if (pathToLoad.startsWith("content://") || pathToLoad.startsWith("file://")) { + GifDrawable(context!!.contentResolver, Uri.parse(pathToLoad)) } else { - GifDrawable(medium.path) + GifDrawable(pathToLoad) } if (!isFragmentVisible) { @@ -241,7 +244,7 @@ class PhotoFragment : ViewPagerFragment() { Glide.with(this) .asBitmap() - .load(medium.path) + .load(getPathToLoad(medium)) .apply(options) .listener(object : RequestListener { override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean) = false @@ -259,7 +262,7 @@ class PhotoFragment : ViewPagerFragment() { Glide.with(this) .asBitmap() - .load(medium.path) + .load(getPathToLoad(medium)) .thumbnail(0.2f) .apply(options) .into(view.gif_view) @@ -273,7 +276,8 @@ class PhotoFragment : ViewPagerFragment() { maxScale = 10f beVisible() isQuickScaleEnabled = context.config.oneFingerZoom - setImage(ImageSource.uri(medium.path)) + setResetScaleOnSizeChange(context.config.screenRotation != ROTATE_BY_ASPECT_RATIO) + setImage(ImageSource.uri(getPathToLoad(medium))) orientation = if (imageOrientation == -1) SubsamplingScaleImageView.ORIENTATION_USE_EXIF else degreesForRotation(imageOrientation) setEagerLoadingEnabled(false) setExecutor(AsyncTask.SERIAL_EXECUTOR) @@ -313,11 +317,12 @@ class PhotoFragment : ViewPagerFragment() { var orient = defaultOrientation try { - val exif = android.media.ExifInterface(medium.path) + val pathToLoad = getPathToLoad(medium) + val exif = android.media.ExifInterface(pathToLoad) 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)) + if (orient == defaultOrientation || medium.path.startsWith(OTG_PATH)) { + val uri = if (pathToLoad.startsWith("content:/")) Uri.parse(pathToLoad) else Uri.fromFile(File(pathToLoad)) val inputStream = context!!.contentResolver.openInputStream(uri) val exif2 = ExifInterface() exif2.readExif(inputStream, ExifInterface.Options.OPTION_ALL) 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 5cf2dc092..ce03f165b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -14,6 +14,7 @@ import android.view.animation.AnimationUtils import android.widget.SeekBar import android.widget.TextView import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.gallery.BuildConfig import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.VideoActivity import com.simplemobiletools.gallery.extensions.* @@ -21,6 +22,7 @@ import com.simplemobiletools.gallery.helpers.MEDIUM import com.simplemobiletools.gallery.helpers.MediaSideScroll import com.simplemobiletools.gallery.models.Medium import kotlinx.android.synthetic.main.pager_video_item.view.* +import java.io.File import java.io.IOException class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSeekBarChangeListener { @@ -183,7 +185,6 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee private fun initTimeHolder() { val res = resources - val height = context!!.navigationBarHeight val left = mTimeHolder!!.paddingLeft val top = mTimeHolder!!.paddingTop var right = mTimeHolder!!.paddingRight @@ -315,10 +316,13 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee return } - val mediumPath = if (wasEncoded) mEncodedPath else medium.path + val mediumPath = if (wasEncoded) mEncodedPath else getPathToLoad(medium) + + // this workaround is needed for example if the filename contains a colon + val fileUri = if (mediumPath.startsWith("/")) context!!.getFilePublicUri(File(mediumPath), BuildConfig.APPLICATION_ID) else Uri.parse(mediumPath) try { mMediaPlayer = MediaPlayer().apply { - setDataSource(context, Uri.parse(mediumPath)) + setDataSource(context, fileUri) setDisplay(mSurfaceHolder) setOnCompletionListener { videoCompleted() } setOnVideoSizeChangedListener { mediaPlayer, width, height -> setVideoSize() } @@ -327,7 +331,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee prepare() } } catch (e: IOException) { - mEncodedPath = Uri.encode(medium.path) + mEncodedPath = Uri.encode(getPathToLoad(medium)) if (wasEncoded) { releaseMediaPlayer() } else { @@ -471,6 +475,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee } private fun skip(forward: Boolean) { + if (mMediaPlayer == null) { + return + } + val curr = mMediaPlayer!!.currentPosition val twoPercents = mMediaPlayer!!.duration / 50 val newProgress = if (forward) curr + twoPercents else curr - twoPercents diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt index 8cb977537..d1c9a4253 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt @@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.fragments import android.support.v4.app.Fragment import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.OTG_PATH import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.models.Medium @@ -45,7 +46,7 @@ abstract class ViewPagerFragment : Fragment() { } if (detailsFlag and EXT_RESOLUTION != 0) { - file.getResolution().formatAsResolution().let { if (it.isNotEmpty()) details.appendln(it) } + file.absolutePath.getResolution()?.formatAsResolution().let { if (it?.isNotEmpty() == true) details.appendln(it) } } if (detailsFlag and EXT_LAST_MODIFIED != 0) { @@ -65,4 +66,6 @@ abstract class ViewPagerFragment : Fragment() { } return details.toString().trim() } + + fun getPathToLoad(medium: Medium) = if (medium.path.startsWith(OTG_PATH)) medium.path.getOTGPublicPath(context!!) else medium.path } 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 333937de6..c8543c2e4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -16,23 +16,19 @@ class Config(context: Context) : BaseConfig(context) { fun newInstance(context: Context) = Config(context) } - var fileSorting: Int - get() = prefs.getInt(SORT_ORDER, SORT_BY_DATE_MODIFIED or SORT_DESCENDING) - set(order) = prefs.edit().putInt(SORT_ORDER, order).apply() - var directorySorting: Int get() = prefs.getInt(DIRECTORY_SORT_ORDER, SORT_BY_DATE_MODIFIED or SORT_DESCENDING) set(order) = prefs.edit().putInt(DIRECTORY_SORT_ORDER, order).apply() fun saveFileSorting(path: String, value: Int) { if (path.isEmpty()) { - fileSorting = value + sorting = value } else { prefs.edit().putInt(SORT_FOLDER_PREFIX + path.toLowerCase(), value).apply() } } - fun getFileSorting(path: String) = prefs.getInt(SORT_FOLDER_PREFIX + path.toLowerCase(), fileSorting) + fun getFileSorting(path: String) = prefs.getInt(SORT_FOLDER_PREFIX + path.toLowerCase(), sorting) fun removeFileSorting(path: String) { prefs.edit().remove(SORT_FOLDER_PREFIX + path.toLowerCase()).apply() @@ -237,10 +233,6 @@ class Config(context: Context) : BaseConfig(context) { return Gson().fromJson>(albumCovers, listType) ?: ArrayList(1) } - var scrollHorizontally: Boolean - get() = prefs.getBoolean(SCROLL_HORIZONTALLY, false) - set(scrollHorizontally) = prefs.edit().putBoolean(SCROLL_HORIZONTALLY, scrollHorizontally).apply() - var hideSystemUI: Boolean get() = prefs.getBoolean(HIDE_SYSTEM_UI, false) set(hideSystemUI) = prefs.edit().putBoolean(HIDE_SYSTEM_UI, hideSystemUI).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 b4ecd1a6d..bf251b41b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -1,7 +1,6 @@ package com.simplemobiletools.gallery.helpers // shared preferences -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" @@ -31,7 +30,6 @@ 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" 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 6df8fc016..d4016c36b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -2,14 +2,13 @@ package com.simplemobiletools.gallery.helpers import android.content.Context import android.database.Cursor +import android.net.Uri import android.provider.MediaStore import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED -import com.simplemobiletools.commons.helpers.SORT_BY_NAME -import com.simplemobiletools.commons.helpers.SORT_BY_SIZE -import com.simplemobiletools.commons.helpers.SORT_DESCENDING +import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.extensions.containsNoMedia +import com.simplemobiletools.gallery.extensions.doesParentHaveNoMedia import com.simplemobiletools.gallery.models.Medium import java.io.File import java.util.LinkedHashMap @@ -21,7 +20,7 @@ class MediaFetcher(val context: Context) { var shouldStop = false fun getMediaByDirectories(isPickVideo: Boolean, isPickImage: Boolean): HashMap> { - val media = getFilesFrom("", isPickImage, isPickVideo) + val media = getFilesFrom("", isPickImage, isPickVideo, true) val excludedPaths = context.config.excludedFolders val includedPaths = context.config.includedFolders val showHidden = context.config.shouldShowHidden @@ -76,22 +75,28 @@ class MediaFetcher(val context: Context) { }.start() } - fun getFilesFrom(curPath: String, isPickImage: Boolean, isPickVideo: Boolean): ArrayList { - val projection = arrayOf(MediaStore.Images.Media._ID, - MediaStore.Images.Media.DISPLAY_NAME, - MediaStore.Images.Media.DATE_TAKEN, - MediaStore.Images.Media.DATE_MODIFIED, - MediaStore.Images.Media.DATA, - MediaStore.Images.Media.SIZE) - val uri = MediaStore.Files.getContentUri("external") - val selection = getSelectionQuery(curPath) - val selectionArgs = getSelectionArgsQuery(curPath) + fun getFilesFrom(curPath: String, isPickImage: Boolean, isPickVideo: Boolean, allowRecursion: Boolean): ArrayList { + if (curPath.startsWith(OTG_PATH)) { + val curMedia = ArrayList() + getMediaOnOTG(curPath, curMedia, isPickImage, isPickVideo, context.config.filterMedia, allowRecursion) + return curMedia + } else { + val projection = arrayOf(MediaStore.Images.Media._ID, + MediaStore.Images.Media.DISPLAY_NAME, + MediaStore.Images.Media.DATE_TAKEN, + MediaStore.Images.Media.DATE_MODIFIED, + MediaStore.Images.Media.DATA, + MediaStore.Images.Media.SIZE) + val uri = MediaStore.Files.getContentUri("external") + val selection = getSelectionQuery(curPath) + val selectionArgs = getSelectionArgsQuery(curPath) - return try { - val cur = context.contentResolver.query(uri, projection, selection, selectionArgs, getSortingForFolder(curPath)) - parseCursor(context, cur, isPickImage, isPickVideo, curPath) - } catch (e: Exception) { - ArrayList() + return try { + val cur = context.contentResolver.query(uri, projection, selection, selectionArgs, getSortingForFolder(curPath)) + parseCursor(context, cur, isPickImage, isPickVideo, curPath, allowRecursion) + } catch (e: Exception) { + ArrayList() + } } } @@ -113,8 +118,9 @@ class MediaFetcher(val context: Context) { private fun getSelectionArgsQuery(path: String): Array? { return if (path.isEmpty()) { - if (context.isAndroidFour()) + if (context.isAndroidFour()) { return null + } if (context.hasExternalSDCard()) { arrayOf("${context.internalStoragePath}/%", "${context.sdCardPath}/%") @@ -126,7 +132,7 @@ class MediaFetcher(val context: Context) { } } - private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isPickVideo: Boolean, curPath: String): ArrayList { + private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isPickVideo: Boolean, curPath: String, allowRecursion: Boolean): ArrayList { val curMedia = ArrayList() val config = context.config val filterMedia = config.filterMedia @@ -138,8 +144,9 @@ class MediaFetcher(val context: Context) { if (cur.moveToFirst()) { do { try { - if (shouldStop) + if (shouldStop) { break + } val path = cur.getStringValue(MediaStore.Images.Media.DATA).trim() var filename = cur.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)?.trim() ?: "" @@ -193,11 +200,15 @@ class MediaFetcher(val context: Context) { } config.includedFolders.filter { it.isNotEmpty() && (curPath.isEmpty() || it == curPath) }.forEach { - getMediaInFolder(it, curMedia, isPickImage, isPickVideo, filterMedia) + if (it.startsWith(OTG_PATH)) { + getMediaOnOTG(it, curMedia, isPickImage, isPickVideo, filterMedia, allowRecursion) + } else { + getMediaInFolder(it, curMedia, isPickImage, isPickVideo, filterMedia, allowRecursion) + } } if (isThirdPartyIntent && curPath.isNotEmpty() && curMedia.isEmpty()) { - getMediaInFolder(curPath, curMedia, isPickImage, isPickVideo, filterMedia) + getMediaInFolder(curPath, curMedia, isPickImage, isPickVideo, filterMedia, allowRecursion) } Medium.sorting = config.getFileSorting(curPath) @@ -208,15 +219,18 @@ class MediaFetcher(val context: Context) { private fun groupDirectories(media: ArrayList): HashMap> { val directories = LinkedHashMap>() + val hasOTG = context.hasOTGConnected() && context.config.OTGBasePath.isNotEmpty() for (medium in media) { - if (shouldStop) + if (shouldStop) { break + } - val parentDir = File(medium.path).parent?.toLowerCase() ?: continue + val parentDir = (if (hasOTG && medium.path.startsWith(OTG_PATH)) medium.path.getParentPath().toLowerCase() else File(medium.path).parent?.toLowerCase()) + ?: continue if (directories.containsKey(parentDir)) { directories[parentDir]!!.add(medium) } else { - directories.put(parentDir, arrayListOf(medium)) + directories[parentDir] = arrayListOf(medium) } } return directories @@ -231,7 +245,7 @@ class MediaFetcher(val context: Context) { } else if (!showHidden && file.isDirectory && file.canonicalFile == file.absoluteFile) { var containsNoMediaOrDot = file.containsNoMedia() || path.contains("/.") if (!containsNoMediaOrDot) { - containsNoMediaOrDot = checkParentHasNoMedia(file.parentFile) + containsNoMediaOrDot = file.doesParentHaveNoMedia() } !containsNoMediaOrDot } else { @@ -239,27 +253,20 @@ class MediaFetcher(val context: Context) { } } - private fun checkParentHasNoMedia(file: File): Boolean { - var curFile = file - while (true) { - if (curFile.containsNoMedia()) { - return true - } - curFile = curFile.parentFile - if (curFile.absolutePath == "/") - break - } - return false - } - private fun isThisOrParentExcluded(path: String, excludedPaths: MutableSet, includedPaths: MutableSet) = includedPaths.none { path.startsWith(it) } && excludedPaths.any { path.startsWith(it) } - private fun getMediaInFolder(folder: String, curMedia: ArrayList, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int) { + private fun getMediaInFolder(folder: String, curMedia: ArrayList, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int, allowRecursion: Boolean) { val files = File(folder).listFiles() ?: return for (file in files) { - if (shouldStop) + if (shouldStop) { break + } + + if (file.isDirectory && allowRecursion) { + getMediaInFolder(file.absolutePath, curMedia, isPickImage, isPickVideo, filterMedia, allowRecursion) + continue + } val filename = file.name val isImage = filename.isImageFast() @@ -300,6 +307,57 @@ class MediaFetcher(val context: Context) { } } + private fun getMediaOnOTG(folder: String, curMedia: ArrayList, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int, allowRecursion: Boolean) { + val files = context.getDocumentFile(folder)?.listFiles() ?: return + for (file in files) { + if (shouldStop) { + return + } + + if (file.isDirectory && allowRecursion) { + getMediaOnOTG("$folder${file.name}", curMedia, isPickImage, isPickVideo, filterMedia, allowRecursion) + continue + } + + val filename = file.name + val isImage = filename.isImageFast() + val isVideo = if (isImage) false else filename.isVideoFast() + val isGif = if (isImage || isVideo) false else filename.isGif() + + if (!isImage && !isVideo && !isGif) + continue + + if (isVideo && (isPickImage || filterMedia and VIDEOS == 0)) + continue + + if (isImage && (isPickVideo || filterMedia and IMAGES == 0)) + continue + + if (isGif && filterMedia and GIFS == 0) + continue + + val size = file.length() + if (size <= 0L && !file.exists()) + continue + + val dateTaken = file.lastModified() + val dateModified = file.lastModified() + + val type = when { + isImage -> TYPE_IMAGE + isVideo -> TYPE_VIDEO + else -> TYPE_GIF + } + + val path = Uri.decode(file.uri.toString().replaceFirst("${context.config.OTGBasePath}%3A", OTG_PATH)) + val medium = Medium(filename, path, dateModified, dateTaken, size, type) + val isAlreadyAdded = curMedia.any { it.path == path } + if (!isAlreadyAdded) { + curMedia.add(medium) + } + } + } + private fun getSortingForFolder(path: String): String { val sorting = context.config.getFileSorting(path) val sortValue = when { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt index fb9e7a213..f00aedda9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt @@ -2,7 +2,7 @@ package com.simplemobiletools.gallery.models import com.simplemobiletools.commons.extensions.formatDate import com.simplemobiletools.commons.extensions.formatSize -import com.simplemobiletools.commons.extensions.getMimeTypeFromPath +import com.simplemobiletools.commons.extensions.getMimeType import com.simplemobiletools.commons.extensions.isDng import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.gallery.helpers.TYPE_GIF @@ -24,7 +24,7 @@ data class Medium(var name: String, var path: String, val modified: Long, val ta fun isDng() = path.isDng() - fun getMimeType() = path.getMimeTypeFromPath() + fun getMimeType() = path.getMimeType() override fun compareTo(other: Medium): Int { var result: Int diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 98d195bbb..a41f8df5c 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -401,6 +401,29 @@ android:textAllCaps="true" android:textSize="@dimen/smaller_text_size"/> + + + + + + + android:text="@string/enable_pull_to_refresh"/> @@ -895,5 +918,28 @@ android:text="@string/keep_last_modified"/> + + + + + + diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index f75a61d8c..cabd543ff 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -147,6 +147,28 @@ Fullscreen media Extended details + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + استوديو لعرض الصور والفيديو بدون اعلانات. diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 37c20d263..d387bb0bc 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -143,6 +143,28 @@ Mitjans a pantalla completa Detalls estesos + + Com puc fer que Simple Gallery sigui la galeria de dispositius predeterminada? + Primer heu de trobar la galeria actualment predeterminada a la secció Aplicacions de la configuració del vostre dispositiu, cerqueu un botó que digui alguna cosa semblant a \"Obrir per defecte \", feu-hi clic i seleccioneu \"Esborra valors predeterminats \". + La propera vegada que proveu d\'obrir una imatge o un vídeo, haureu de veure un selector d\'aplicació, on podeu seleccionar Simple Galeria i convertir-la en la aplicació predeterminada. + Vaig bloquejar l\'aplicació amb una contrasenya, però l\'he oblidat. Què puc fer? + Es pot resoldre de dues maneres. Podeu tornar a instal·lar l\'aplicació o trobar l\'aplicació a la configuració del dispositiu i seleccionar \"Esborrar dades \". Això reiniciarà totes les configuracions, no eliminarà cap fitxer multimèdia. + Com puc fer que un àlbum sempre aparegui a la part superior? + Podeu prémer l\'àlbum desitjat i seleccionar la icona de la xinxeta al menú d\'acció i el fixarà a la part superior. També podeu enganxar diverses carpetes, els elements fixats s'ordenaran pel mètode de classificació predeterminat. + Com puc fer avançar els vídeos? + Podeu fer clic als textos actuals o de duració màxima que hi ha a prop de la barra de cerca, això mourà el vídeo cap a enrere o cap endavant. + Quina és la diferència entre ocultar i excloure una carpeta? + Excloure impedeix mostrar la carpeta només a Simple Galery, mentre que Ocultar també amaga la carpeta a altres galeries. Funciona creant un fitxer \". Nomedia \" buit a la carpeta donada, que podeu eliminar amb qualsevol gestor de fitxers. + Per què apareixen les carpetes amb les portades de la música o adhesius? + Pot passar que veuràs que apareixen alguns àlbums inusuals. Podeu excloure\'ls fàcilment prement-los i seleccionant Excloure. Al següent diàleg, podeu seleccionar la carpeta principal, és probable que impedeixi que apareguin altres àlbums relacionats. + Una carpeta amb imatges no apareix, què puc fer? + Això pot tenir diversos motius, però resoldre-ho és fàcil. Accediu a Configuració -> Gestiona les carpetes incloses, seleccioneu Més i navegueu fins a la carpeta necessària. + Què passa si vull veure només algunes carpetes concretes? + L\'addició d\'una carpeta a les carpetes incloses no exclou automàticament res. El que podeu fer és anar a Configuració -> Gestionar carpetes excloses, excloure la carpeta arrel \"/\" i, a continuació, afegir les carpetes desitjades a Configuració -> Gestionar carpetes incloses. + Això farà que només les carpetes seleccionades siguin visibles, ja que tant excloure com incloure són recursius i si una carpeta està exclosa i inclosa, es mostrarà. + Les imatges a pantalla completa tenen artefactes estranys, puc millorar d\'alguna manera la qualitat? + Sí, hi ha un commutador a la configuració que diu \"Substituïu imatges ampliades i de gran qualitat\", podeu fer-ho. Millora la qualitat de les imatges, però es borraran una vegada que intenteu fer zoom massa. + Una galeria per veure imatges i vídeos sense publicitat. diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 16b76fe49..bf5510018 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -143,6 +143,28 @@ Fullscreen media Extended details + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Galerie na prohlížení obrázků a videí bez reklam. diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index b02e45e42..2aaa5215e 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -143,6 +143,28 @@ Vollbild-Medien Erweiterte Details + + Wie kann ich Schlichte Galerie als Standardanwendung auswählen? + Zunächst musst du unter \"Apps\" in den Geräteeinstellungen die aktuelle Standardgalerie finden. Suche nach einer Bedienfläche wie \"Standardmässig öffnen\", betätige diese und wähle \"Standardeinstellungen löschen\". + Das nächste Mal, wenn du ein Bild oder ein Video öffnest, sollte ein Appwähler erscheinen und Schlichte Gallerie als Standard ausgewählt werden können. + Ich habe die App mit einem Passwort geschützt, aber ich habe es vergessen. Was kann ich tun? + Es gibt zwei Möglichkeiten: Entweder du installierst die App erneut oder du gehst unter Apps in den Geräteeinstellungen und wählst \"Daten löschen\". Alle Einstellungen werden zurückgesetzt, alle Mediendateien bleiben unberührt. + Wie kann ich ein Album immer zuoberst erscheinen lassen? + Du kannst lange auf das gewünschte Album drücken und im Aktionsmenü das Stecknadelsymbol auswählen; es wird nun zuoberst angepinnt. Ebenso kannst du mehrere Ordner anpinnen. Angepinnte Objekte werden nach der Standardmethode sortiert. + Wie kann ich Videos vorspulen? + Du kannst auf den Text der aktuellen oder der maximalen Dauer nahe der Suchleiste drücken, um das Video zurück- oder vorzuspulen. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Eine schlichte Galerie zum Betrachten von Bildern und Videos, ganz ohne Werbung. diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index a6889d070..3801bd937 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -143,6 +143,28 @@ Medios a pantalla compelta Detalles ampliados + + ¿Cómo puedo hacer que Simple Gallery sea la galería de dispositivos predeterminada? + Primero tiene que encontrar la galería predeterminada actualmente en la sección Aplicaciones de la configuración de su dispositivo, busque un botón que diga algo como \"Abrir por defecto \", haga clic en él, luego seleccione \"Borrar valores predeterminados \". + La próxima vez que intente abrir una imagen o video, debería ver un selector de aplicaciones, donde puede seleccionar Galería simple y convertirla en la aplicación predeterminada. + He protegido la aplicación con una contraseña, pero la he olvidado. ¿Que puedo hacer? + Puedes resolverlo de 2 maneras. Puede reinstalar la aplicación o encontrar la aplicación en la configuración de su dispositivo y seleccionar \"Borrar datos \". Restablecerá todas sus configuraciones, no eliminará ningún archivo multimedia. + ¿Cómo puedo hacer que un álbum siempre aparezca en la parte superior? + Puede aguantar pulaso el álbum deseado y seleccionar el ícono Pin en el menú de acción, que lo fijará en la parte superior. También puede anclar varias carpetas, los artículos fijados se ordenarán por el método de clasificación predeterminado. + ¿Cómo puedo avanzar videos? + Puede hacer clic en los textos de duración actual o máxima cerca de la barra de búsqueda, que moverán el video hacia atrás o hacia adelante. + ¿Cuál es la diferencia entre ocultar y excluir una carpeta? + Excluir evita mostrar la carpeta solo en Simple Gallery, mientras que Ocultar funciona en el sistema y oculta la carpeta de otras galerías también. Funciona al crear un archivo \".nomedia \" vacío en la carpeta determinada, que luego puede eliminar también con cualquier administrador de archivos. + ¿Por qué aparecen las carpetas con la portada de la música o las pegatinas? + Puede suceder que veas aparecer algunos álbumes inusuales. Puede excluirlos fácilmente presionándolos durante mucho tiempo y seleccionando Excluir. En el siguiente cuadro de diálogo, puede seleccionar la carpeta principal, lo más probable es que evite que aparezcan otros álbumes relacionados. + Una carpeta con imágenes no aparece, ¿qué puedo hacer? + Eso puede tener múltiples razones, pero resolverlo es fácil. Simplemente vaya a Configuración -> Administrar carpetas incluidas, seleccione Más y vaya a la carpeta requerida. + ¿Qué pasa si quiero solo algunas carpetas concretas visibles? + Agregar una carpeta en las carpetas incluidas no excluye automáticamente nada. Lo que puede hacer es ir a Ajustes -> Administrar carpetas excluidas, excluir la carpeta raíz \"/\", luego agregar las carpetas deseadas en Configuración -> Administrar carpetas incluidas. + Esto hará que solo las carpetas seleccionadas sean visibles, ya que tanto la exclusión como la inclusión son recursivas y si una carpeta está excluida e incluida, aparecerá. + Las imágenes a pantalla completa tienen artefactos extraños, ¿puedo de alguna manera mejorar la calidad? + Sí, hay una alternancia en Configuración que dice \"Reemplazar imágenes con zoom profundo con las de mejor calidad\", puedes usar eso. Mejorará la calidad de las imágenes, pero se volverán borrosas una vez que intente ampliar demasiado. + Una galería para ver fotos y vídeos sin publicidad. diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 5db309a6c..217ef3ab0 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -7,23 +7,23 @@ (piilotettu) Kiinnitä kansio Poista kiinnitys - Pin to the top + Kiinnitä ylimmäksi Näytä kaikkien kansioiden sisältö Kaikki kansiot Vaihda kansionäkymään Muu kansio Näytä kartalla Tuntematon sijainti - Increase column count - Reduce column count + Lisää sarakkeita + Vähennä sarakkeita Vaihda kansikuva Valitse kuva Käytä oletuksia Äänenvoimakkuus Kirkkaus - Do not ask again in this session - Lock orientation - Unlock orientation + Älä kysy uudestaan tällä istunnolla + Lukitse näytönkierto + Vapauta näytönkierto Suodata media @@ -43,8 +43,8 @@ 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 + Piilotetut kansiot + Hallitse piilotettuja kansioita Seems like you don\'t have any folders hidden with a \".nomedia\" file. @@ -89,9 +89,9 @@ Taustakuva asetettu onnistuneesti Kuvasuhde pystyssä Kuvasuhde vaakatasossa - Home screen - Lock screen - Home and lock screen + Aloitusnäyttö + Lukitusnäyttö + Aloitusnäyttö ja lukitusnäyttö Diaesitys @@ -122,26 +122,48 @@ Järjestelmän asetukset Laitteen kierto Kuvasuhde - Black background and status bar at fullscreen media + Musta tausta ja tilapalkki täyden ruudun tilassa Vieritä pienoiskuvia vaakasuorassa Piilota järjestelmän UI automaattisesti koko näytön mediassa Poista tyhjät kansiot kansion tyhjennyksen jälkeen - Allow controlling photo brightness with vertical gestures + Salli kirkkauden säätäminen pystysuorilla eleillä Salli videon äänenvoimakkuuden ja kirkkauden säätö pystysuorilla eleillä - Show folder media count on the main view + Näytä kansioiden sisällön määrä päänäkymässä Korvaa jakaminen kääntämisellä koko näytön tilassa - Show extended details over fullscreen media - 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 - Hide extended details when status bar is hidden - Do an extra check to avoid showing invalid files + Näytä yksityiskohtaiset tiedot täyden näytön tilassa + Hallitse yksityiskohtaisia tietoja + Salli lähentäminen yhdellä sormella täyden ruudun tilassa + Salli median selaaminen ruudun reunoja koskettamalla + Korvaa syvälle lähennettävät kuvat parempilaatuisella + Piilota yksityiskohtaiset tiedot kun tilapalkki on piilotettu + Tee ylimääräinen tarkistus rikkinäisten tiedostojen varalta - Thumbnails - Fullscreen media - Extended details + Esikatselukuvat + Täyden näytön media + Yksityiskohtaiset tiedot + + + Miten voin tehdä Simple Gallerystä oletusgalleriasovelluksen? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 2163d8031..b2c0f3a59 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -143,6 +143,28 @@ Média plein écran Détails supplémentaires + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Un album pour visionner photos et vidéos sans publicité. diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index ae64e382a..a4b605bc9 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -43,9 +43,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 + Cartafoles ocultos Xestionar cartafoles ocultos - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + Semella que non ten ningún cartafol oculto con un ficheiro \".nomedia\". Cartafoles incluídos @@ -86,7 +86,7 @@ Fallou establecer fondo de pantalla Establecer fondo de pantalla con: Establecendo fondo de pantalla… - fondo de pantalla establecido con éxito + Fondo de pantalla establecido con éxito Proporción de Retrato Proporción de Paisaxe Pantalla de incio @@ -126,22 +126,44 @@ Desplazar iconas horizontalmente Agochar controis do sistema cando visualice a pantalla completa Borrar cartafoles baldeiros cando elmine o seu contido - Allow controlling photo brightness with vertical gestures + Permitir controlar o brillo da foto con xestos verticais Permitir controlar o volume do vídeo e o brillo con xestos verticáis Mostrar a conta de medios do cartafol na vista principal Substituír Compartir con Rotar no menú de pantalla completa Mostrar información pormenorizada sobre medios a pantalla completa 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 - Hide extended details when status bar is hidden - Do an extra check to avoid showing invalid files + Permitir o cambio instantáneo de medios pulsando nos lados da pantalla + Substituír imaxes con un gran zoom por por outras con mellor calidade + Agochar detalles extendidos cando a barra de estado está oculta + Facer unha comprobación extra para evitar mostrar ficheiros non válidos - Thumbnails - Fullscreen media - Extended details + Iconas + Medios a pantalla completa + Detalles ampliados + + + Cómo podo facer que Simple Gallery sexa a galería por omisión no dispositivo? + Primeiro debe atopar a galería por omsión actual na sección de App nos axustes do dispositivo, buscar un botón que diga algo como \"Abrir por omisión\", pulsalo e despois seleccionar \"Limpar por omisión\". + A próxima vez que intente abrir unha imaxe ou vídeo aparecerá un selector de aplicativos onde pode escoller Simple Gallery e facela o aplicativo por omisión. + Asegurei o aplicativo con un contrasinal, pero esquecino. Qué podo facer? + Pode solucionado de dous xeitos. Ou ben reinstalar o aplicativo ou buscar o aplicativo nos axustes do dispositivo e escoller \"Limpar datos\". Restablecerá todos os seus axustes, mais non eliminará ficheiros de medios. + Cómo podo facer que un álbume apareza sempre arriba de todo? + Pode manter premido o álbume e escoller a icona de Fixar no menú de accións, esto fixarao arriba. Pode fixar varios cartafoles tambén, os elementos fixados estarán ordenados polo criterio por omisión. + Cómo podo aumentar a velocidade de reprodución de vídeo? + Pode pulsar no texto de duración actual ou máxima preto da barra de busca, esto moverá ou vídeo hacia adiante ou atrás. + Cal é a diferenza entre agochar e excluír un cartafol? + A Exclusión prevén que se mostre o cartafol só en Simple Gallery, mentras Agochar funciona para todo o sistema e agocha o cartafol para outras galerías tamén. Esto funciona creando un ficheiro baldeiro de nome \".nomedia\" no cartafol, que tamén pode quitar con calquer xestor de ficheiros. + Por qué aparecen cartafoles de música con portadas ou pegatinas? + Pode acontecer que vexa que aparecen álbumes raros. Pode excluílos con facilidade mantendo premidos e escollendo Excluír. No seguinte diálogo pode escoller o cartafol pai, esto probablemente agoche outros álbumes relacionados. + Un cartafol con imaxes non aparece, qué podo facer? + Esto pode acontecer por varias razóns, pero é doado resolvelo. Vaia a Axustes -> xestionar cartafoles incluídos, escolle o Máis e navegar ate o cartafol requerido. + E qué pasa si só quero que sexan visibles certos cartafoles + Engadir un cartafol a Cartafoles incluídos non exclúe nada de xeito automático. O que pode facer é ir a Axustes -> Xestionar cartafoles incluídos, excluír o cartafol root \"/\", e despóis engadir os cartafoles desexados con Axustes -> Xestionar Cartafoles Incluídos. + Esto fará visibles só aos cartafoles escollidos, como tanto excluír e incluír son recursivos e si está excluído e logo incluído, será mostrado. + As imaxes a pantalla completa teñen píxeles extranos, podo mellorar a calidade da imaxe? + Si, hai unha opción en Axustes que di \"Substituír imaxes con un gran zoom con imaxes de mellor calidade\", pode usar eso. mellorará a calidade das imaxes, mais farase máis borrosaxa si intenta facer moito zoom. diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 36fb734fb..5b3ff3fb8 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -143,6 +143,28 @@ Fullscreen media Extended details + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Galerija za pregledavanje slika, GIFova i videa bez reklama. diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index f6ee30b59..946385bfa 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -143,6 +143,28 @@ Fullscreen media Extended details + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + A gallery for viewing photos and videos without ads. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index a0bb6b6bd..e2bf44d15 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -143,6 +143,28 @@ Media a schermo intero Dettagli estesi + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Una galleria per visualizzare foto e video senza pubblicità. diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 540a8f242..3f21d49a0 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -5,13 +5,13 @@ 編集 カメラを開く (非表示) - フォルダーをピン留めする - フォルダーのピン留めを外す - Pin to the top + フォルダをピン留めする + フォルダのピン留めを外す + トップにピン留めする 全てを表示 - すべてのフォルダー - フォルダーを選択する - その他のフォルダー + すべてのフォルダ + フォルダを選択する + その他のフォルダ 地図で表示 位置情報がありません 列数を増やす @@ -21,12 +21,12 @@ デフォルトに戻す 音量 明るさ - Do not ask again in this session - Lock orientation - Unlock orientation + このセッションでは再度たずねない + 画面の向きを固定する + 向きの固定を解除する - 表示メディア種 + 表示するメディアの種類 画像 ビデオ GIF @@ -34,24 +34,24 @@ 絞り込み条件を変更 - 対象のフォルダーに「.nomedia」というファイルを作成し、フォルダーを非表示にします。そのフォルダー以下のすべてのサブフォルダーも、同様に非表示となります。非表示となったフォルダーを見るには、「設定」の中にある「非表示のフォルダーを表示」オプションを切り替えてください。このフォルダーを非表示にしますか? + 対象のフォルダに「.nomedia」というファイルを作成し、フォルダを非表示にします。そのフォルダ以下のすべてのサブフォルダも、同様に非表示となります。非表示となったフォルダを見るには、「設定」の中にある「非表示のフォルダを表示」オプションを切り替えてください。このフォルダを非表示にしますか? 除外する - 除外フォルダー - 除外フォルダーを管理 - 選択したフォルダーとそのサブフォルダーを、Simple Galleyの一覧から除外します。除外したフォルダーは「設定」で管理できます。 - 親フォルダーを選択して除外することもできます。 - フォルダーを除外すると、サブフォルダーも含めSimple Galleyの一覧から除外します。他のアプリでは引き続き表示されます。\\n\\n他のアプリでも非表示にしたい場合は、「非表示」機能を使用してください。 + 除外フォルダ + 除外フォルダを管理 + 選択したフォルダとそのサブフォルダを、Simple Galleyの一覧から除外します。除外したフォルダは「設定」で管理できます。 + 親フォルダを選択して除外することもできます。 + フォルダを除外すると、サブフォルダも含めSimple Galleyの一覧から除外します。他のアプリでは引き続き表示されます。\\n\\n他のアプリでも非表示にしたい場合は、「非表示」機能を使用してください。 すべて解除 - 除外するフォルダーの登録をすべて解除しますか? フォルダー自体は削除されません。 - Hidden folders - Manage hidden folders - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + 除外するフォルダの登録をすべて解除しますか? フォルダ自体は削除されません。 + 非表示フォルダ + 非表示フォルダを管理する + \".nomedia\"ファイルで隠されたフォルダはありません。 - 追加フォルダー - 追加フォルダーを管理 - フォルダーを追加 - メディアを含んでいるフォルダーがアプリから認識されていない場合は、手動で追加できます。 + 追加フォルダ + 追加フォルダを管理 + フォルダを追加 + メディアを含んでいるフォルダがアプリから認識されていない場合は、手動で追加できます。 リサイズ @@ -89,9 +89,9 @@ 壁紙を正常に設定しました 縦向きの縦横比 横向きの縦横比 - Home screen - Lock screen - Home and lock screen + ホーム画面 + ロック画面 + ホーム画面とロック画面 スライドショー @@ -107,9 +107,9 @@ スライドショーに表示するメディアがありません - Change view type - Grid - List + 表示形式の変更 + グリッド + リスト ビデオを自動再生する @@ -122,36 +122,58 @@ システム設定に従う 端末の向きに従う メディアの縦横比に従う - Black background and status bar at fullscreen media + フルスクリーン表示の背景色とステータスバーの背景色を黒にする サムネイル画面を横方向にスクロール フルスクリーン時にシステムUIを非表示にする - メディアの削除後にフォルダーが空になった場合、そのフォルダーを削除する - Allow controlling photo brightness with vertical gestures + メディアの削除後にフォルダが空になった場合、そのフォルダを削除する + 垂直のジェスチャーで写真の明るさを制御できるようにする ビデオ再生中に、音量と明るさを縦方向のジェスチャーで変更する - Show folder media count on the main view + フォルダの中にあるメディアの数をメイン画面に表示する フルスクリーンメニューの「共有」を「回転」に置き換える - Show extended details over fullscreen media - 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 - Hide extended details when status bar is hidden - Do an extra check to avoid showing invalid files + フルスクリーン画面に詳細を重ねて表示する + 詳細表示を管理する + フルスクリーン表示のメディアを指ひとつでズームできるようにする + 画面の端を押してメディアをすぐに変更できるようにする + ズーム可能な画像をより高画質なものに置き換える + ステータスバーが非表示の時は詳細を表示しない + 無効なファイルを表示しないための調査を行います - Thumbnails - Fullscreen media - Extended details + サムネイル + メディアのみ + 詳細も表示する + + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. 写真やビデオを見るためのギャラリー。広告はありません。 - 写真やビデオを見るためのシンプルなツール。 日付、サイズ、名前で、昇順または降順にアイテムを並べ替えることができ、写真は拡大表示できます。 メディアファイルは、ディスプレイのサイズに応じて複数の列に表示されます。 名前の変更、共有、削除、コピー、移動が可能です。 画像をトリミング、回転、または壁紙としてアプリから直接設定することもできます。 + 写真やビデオを見るためのシンプルなツール。 日付、サイズ、名前で、昇順または降順にアイテムを並べ替えることができ、写真は拡大表示できます。 メディアファイルは、画面のサイズに応じて最適な列数で表示されます。 名前の変更、共有、削除、コピー、移動が可能です。 画像をトリミング、回転、または壁紙としてアプリから直接設定することもできます。 - ギャラリーは、画像やビデオのプレビュー、メールクライアントで添付ファイルの追加など、サードパーティの用途にも提供されます。 毎日の使用には完璧です。 + ギャラリーは、画像やビデオのプレビュー、メールクライアントで添付ファイルの追加など、サードパーティの用途にも提供されます。 日々の使用には最適です。 - The fingerprint permission is needed for locking either hidden item visibility, or the whole app. + 隠しアイテムを表示したりアプリそのものをロックするには指紋認証の許可が必要です。 広告や不要なアクセス許可は含まれていません。 完全にオープンソースで、ダークテーマも提供しています。 diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 813ff8565..7ffb81c98 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -34,18 +34,18 @@ 필터 변경 - 현재폴더 및 모든 하위폴더를 \'.nomedia\' 폴더를 생성하여 숨김니다. 숨김 처리된 모들 폴더는 옵션설정의 \'숨김파일 보기\' 메뉴를 이용하여 다시 보실 수 있습니다. 계속 하시겠습니까? + 현재폴더 및 모든 하위폴더를 \'.nomedia\' 폴더를 생성하여 숨김니다. 숨김 처리된 모든 폴더는 옵션설정의 \'숨김파일 보기\' 메뉴를 이용하여 다시 보실 수 있습니다. 계속 하시겠습니까? 제외하기 제외된 폴더 제외된 폴더관리 현재폴더 및 모든 하위폴더를 심플 갤러리에서 제외시킵니다. 제외된 폴더는 옵션설정에서 관리 할 수 있습니다. 상위 폴더를 제외 하시겠습니까? - 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. + 폴더를 제외하면 하위폴더까지 심플 갤러리에서 숨김처리 되지만, 다른 앱에서는 숨김처리 되지 않습니다. \n\n다른 앱에서도 보이지 않게 하려면 숨김기능을 사용하십시오. 모두 제거 제외 목록을 모두 삭제 하시겠습니다? 목록을 삭제해도 폴더가 삭제되지는 않습니다. - Hidden folders - Manage hidden folders - Seems like you don\'t have any folders hidden with a \".nomedia\" file. + 숨겨진 폴더 + 숨김폴더 관리 + \".nomedia\" 하위에 숨김 처리된 폴더가 존재하지 않습니다. 포함된 폴더 @@ -122,26 +122,48 @@ 시스템 설정 디바이스 회전 가로세로 비율 - Black background and status bar at fullscreen media + 전체화면 모드에서 검정색 배경 및 상태바 사용 섬네일 수평스크롤 전체화면 모드에서 시스템 UI 숨김 콘텐츠 삭제 후 빈폴더 삭제 - Allow controlling photo brightness with vertical gestures + 상하 제스처로 사진 밝기 제어 수직 제스처로 비디오 볼륨 및 밝기 제어 폴더에 포함된 미디어파일 수 표시 전체화면 메뉴의 공유 아이콘을 회전 아이콘으로 변경 전체화면 모드에서 세부정보 표시 확장된 세부정보 관리 - 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 - Do an extra check to avoid showing invalid files + 잘못된 파일 표시를 방지하기 위해 추가 검사 수행 - Thumbnails - Fullscreen media - Extended details + 섬네일 + 미디어 전체화면 + 확장 된 세부 정보 + + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index cf7e1d702..f0145b3b4 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -143,6 +143,28 @@ Mediavisning Utvidede detaljer + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + A gallery for viewing photos and videos without ads. diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index b966fa1f6..fd1179b37 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -143,6 +143,28 @@ Volledig scherm Uitgebreide informatie + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Een galerij voor afbeeldingen en video\'s, zonder advertenties. diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 1ba92b71f..1b285bf3a 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -40,7 +40,7 @@ Zarządzaj wykluczonymi folderami Działa na folderach galerii. Możesz zarządzać wykluczonymi folderami w ustawieniach aplikacji. Wykluczyć folder nadrzędny? - 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. +    Wykluczenie folderów ukryje je tylko w niniejszej aplikacji, 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.   Ukryte foldery @@ -126,8 +126,8 @@ Przewijaj miniatury poziomo Ukrywaj interfejs przy pełnoekranowym podglądzie Usuwaj puste foldery po usunięciu ich zawartości - Allow controlling photo brightness with vertical gestures - Zezwalaj na kontrolę jasności i głośności filmów pionowymi gestami +    Zezwalaj na kontrolowanie jasności zdjęcia pionowymi gestami +    Zezwalaj na kontrolowanie jasności i głośności filmów pionowymi gestami Pokazuj liczbę elementów w folderach w głównym widoku Zamień funkcję udostępniania na obracanie w menu pełnoekranowym Dodatkowe szczegóły przy podglądzie pełnoekranowym @@ -136,13 +136,33 @@    Zezwalaj na natychmiastową zmianę multimediów po kliknięciu boków ekranu    Zamieniaj powiększalne obrazy na te o lepszej jakości    Ukrywaj dodatkowe szczegóły gdy pasek stanu jest ukryty - Do an extra check to avoid showing invalid files +    Dodatkowe sprawdzenie w celu uniknięcia pokazywania niewłaściwych plików    Miniatury    Widok pełnoekranowy    Dodatkowe szczegóły + +    Jak mogę ustawić tą aplikację jako domyślną aplikację galerii? +    Znajdź obecną domyślną aplikację galerii w ustawieniach systemowych (sekcja \'Aplikacje\'). Na ekranie z informacjami o niej kliknij \'Otwórz domyślnie\', a następnie \'Wyczyść domyślne\'. Gdy podczas następnej próby otwarcia zdjęcia czy filmu system zapyta Cię jaką aplikacją to zrobić, wybierz Prostą Galerię i opcję zapamiętania tego wyboru. +    Zablokowałem(-am) aplikację hasłem i wyleciało mi ono z głowy. Co mogę zrobić? +    Masz dwie opcje: przeinstalowanie aplikacji lub wyczyszczenie jej ustawień. Niezależnie od wyboru, pliki pozostaną nienaruszone. +    Jak sprawić, aby album(y) zawsze pojawiał(y) się na górze? +    Przytrzymaj album(y) i wybierz ikonę przypięcia w pasku akcji. +    Jak mogę przwijać filmy? +    Kliknij na napisie z czasem trwania filmu, bądź tym z obecnym momentem filmu. +    Jaka jest różnica pomiędzy ukryciem, a wykluczeniem folderu? +    Wykluczenie działa tylko w obrębie niniejszej aplikacji (wszędzie indziej pliki są normalnie widoczne), ukrywanie - w obrębie całego systemu (nie widać ich nigdzie), dodawany jest wtedy do folderu pusty plik \'.nomedia\', który możesz usunąć w dowolnym menedżerze plików. +    Dlaczego pokazują mi się foldery z okładkami do piosenek i tym podobne rzeczy? +    Cóż, zdjęcie to zdjęcie. Aplikacja nie wie, czy to jest akurat okładka od piosenki, czy cokolwiek innego. Aby ukryć niechciane rzeczy, przytrzymaj je i wybierz opcję \'Wyklucz\' z paska akcji. +    Nie pokazuje(-ą) mi się folder(y) ze zdjęciami / filmami. Co mogę zrobić? +    Wejdź do ustawień aplikacji i w sekcji z dołączonymi folderami dodaj tenże folder do listy. +    Co jeśli chcę widzieć tylko.wybrane foldery? +    Przejdź do sekcji z wykluczonymi folderami w ustawieniach aplikacji, dodaj tam folder główny (\"/\"), a następnie dodaj pożądane foldery w sekcji z dołączonymi folderami. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Prosta galeria bez reklam do przeglądania obrazów i filmów. diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 14d8ea1f3..5c8c8958e 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -126,7 +126,7 @@ Rolar miniaturas horizontalmente Esconder interface do sistema automaticamente quando em tela cheia Apagar pastas vazias após deleter seu conteúdo - Allow controlling photo brightness with vertical gestures + Permitir controle do brilho com gestos na vertical Permitir controle do volume e brilho com gestos na vertical Mostrar quantidade de arquivos das pastas Substituir botão "Compartilhar" por "Rotação de tela" quando em tela cheia @@ -143,6 +143,28 @@ Mídia em tela cheia Detalhes extendidos + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Um aplicativo para visualizar fotos e vídeos. diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index c158d291d..35979003c 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -143,6 +143,28 @@ Multimédia em ecrã completo Detalhes extra + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Uma aplicação para ver fotografias e vídeos. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index e727a4dbf..f7cd378f5 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -143,6 +143,28 @@ Полноэкранное отображение медиафайлов Подробности + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Галерея для просмотра изображений и видео. Без рекламы. diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 21dd19109..469dcfa1e 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -143,6 +143,28 @@ Celoobrazovkový režim Rozšírené vlastnosti + + Ako viem spraviť Jednoduchú Galériu predvolenou galériou zariadenia? + Najprv musíte nájsť v nastaveniach zariadenia,sekcii Aplikácie, súčasnú predvolenú galériu, zvoliť tlačidlo s textom v zmysle \"Nastavenie predvoleného otvárania\" a následne \"Vymazať predvolené nastavenia\". + Ak potom skúsite otvoriť obrázok alebo video, zobrazí sa zoznam aplikácií, kde viete zvoliť Jednoduchú Galériu a nastaviť ju ako predvolenú. + Uzamkol som apku heslom, ale zabudol som ho. Čo môžem spraviť? + Viete to vyriešǐť 2 spôsobmi. Môžete apku buď preinštalovať, alebo ju nájsť v nastaveniach zariadenia a zvoliť \"Vymazať údaje\". Vymaže to iba nastavenia, nie súbory. + Ako môžem dosiahnuť, aby bol daný album stále zobrazený prvý? + Môžete označiť daný priečinok dlhým podržaním a zvoliť tlačidlo s obrázkom pripinačky, to ho pripne na vrch. Môžete pripnúť aj viacero priečinkov, budú zoradené podľa zvoleného radenia. + Ako viem posunúť video vpred? + Môžete kliknúť na texty súčasnej, alebo maximálnej dĺžky videa, ktoré sú vedľa indikátora súčasného progresu. To posunie video buď vpred, alebo vzad. + Aký je rozdiel medzi Skrytím a Vylúčením priečinka? + Kým vylúčenie predíde zobrazeniu priečinka iba vrámci Jednoduchej Galérie, skrytie ho ukryje vrámci celého systému, teda to ovplyvní aj ostatné galérie. Skrytie funguje pomocou vytvorenia prázdneho \".nomedia\" súboru v danom priečinku, ktorý viete vymazať aj nejakým správcom súborov. + Prečo sa mi zobrazujú priečinky s obalmi hudobných albumov, alebo nálepkami? + Môže sa stať, že sa vám zobrazia aj nezvyčajné priečinky. Viete ich ale jednoducho ukryť pomocou ich zvolenia dlhým podržaním a zvolením Vylúčiť. Ak na nasledovnom dialógu zvolíte vylúčenie rodičovského priečinka, pravdepodobne budú vylúčené aj ostatné, podobné priečinky. + Priečinok s fotkami sa mi nezobrazuje, čo môžem urobiť? + Môže to mať viacero dôvodov, riešenie je ale jednoduché. Choďte do Nastavenia -> Spravovať pridané priečinky, zvoľte Plus a zvoľte vytúžený priečinok. + Čo v prípade, ak chcem mať zobrazených iba pár priečinkov? + Pridanie priečinka medzi Pridané Priečinky automaticky nevylúči ostatné. Môžete ale ísť do Nastavenia -> Spravovať vylúčené priečinky a zvoliť Koreňový priečinok \"/\", následne pridať žiadané priečinky v Nastavenia -> Spravovať pridané priečinky. + To spôsobí, že budú zobrazené iba vyžiadané priečinky, keďže aj vylúčenie, aj pridanie fungujú rekurzívne a ak je priečinok vylúčený, aj pridaný, bude viditeľný. + Fotky na celú obrazovku majú zhoršenú kvalitu, viem ju nejak zlepšiť? + Áno, v nastaveniach je prepínač s textom \"Nahradiť hlboko priblížiteľné obrázky s obrázkami s lepšou kvalitou\", môžete ho skúsiť. Spôsobí to vyššiu kvalitu obrázkov, po priblížení sa ale budú rozmazávať oveľa skôr. + Galéria na prezeranie obrázkov a videí bez reklám. diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index b65c23c2d..ccc80b3b9 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -5,9 +5,9 @@ Redigera Starta kameran (dold) - Fäst mappen - Släpp mappen - Pin to the top + Fäst mapp + Lossa mapp + Fäst högst upp Visa alla mappars innehåll Alla mappar Byt till mappvy @@ -62,14 +62,14 @@ Ange en giltig bildupplösning - Redigera + Redigerare Spara Rotera Sökväg Ogiltig bildsökväg Bilden kunde inte redigeras Redigera bilden med: - Hittade ingen bildredigerare + Ingen bildredigerare hittades Okänd filplats Det gick inte att skriva över källfilen Rotera åt vänster @@ -116,7 +116,7 @@ Visa/dölj filnamnen Spela upp videor om och om igen Animera GIF-bilders miniatyrer - Maximal ljusstyrka när media visas + Maximal ljusstyrka när media visas i helskärmsläge Beskär miniatyrer till kvadrater Rotera media i helskärmsläge Systeminställning @@ -126,22 +126,44 @@ Rulla horisontellt genom miniatyrer Dölj systemanvändargränssnittet automatiskt när media visas i helskärmsläge Ta bort tomma mappar när deras innehåll tas bort - Allow controlling photo brightness with vertical gestures + Tillåt styrning av fotoljusstyrka med vertikala gester Tillåt styrning av videovolym och videoljusstyrka med vertikala gester Visa antalet mediefiler i varje mapp i huvudvyn Ersätt Dela med Rotera i helskärmsmenyn Visa utökad information över media i helskärmsläge 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 - Hide extended details when status bar is hidden - Do an extra check to avoid showing invalid files + Tillåt zoomning med ett finger när media visas i helskärmsläge + Tillåt snabbyte av media genom tryckning på skärmens kanter + Ersätt djupt zoombara bilder med bilder av bättre kvalitet + Dölj utökad information när statusfältet är dolt + Gör en extra kontroll för att hindra ogiltiga filer från att visas - Thumbnails - Fullscreen media - Extended details + Miniatyrer + Visning av media i helskärmsläge + Utökad information + + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 834639abb..fd4101be4 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -143,6 +143,28 @@ Fullscreen media Extended details + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + Fotoğrafları ve videoları reklamsız görüntülemek için kullanılan bir galeri. diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index f4439d761..7325a9610 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -143,6 +143,28 @@ 全屏显示媒体 扩展详情 + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + 一个没有广告,用来观看照片及视频的相册。 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index db09cd9f1..647c2b65a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -143,19 +143,41 @@ 全螢幕媒體檔案 詳細資訊 + + 我如何將簡易相簿設為預設相簿? + 首先你必須先在裝置設定中應用程式部分尋找目前預設相簿,找到一個像是\"預設開啟(Open by default)\"的按鈕,點下去,然後選擇\"清除預設(Clear defaults)\"。 + 下次你要開啟圖片或影片時應該會看到程式選擇器,你可以在那裡選擇簡易相簿並設為預設程式。 + 我用密碼鎖住了這應用程式,但我忘記了。怎麼辦? + 有兩個解決方法。你可以重新安裝應用程式,或者在裝置設定中找到這程式然後選擇\"清除資料(Clear data)\"。這將重置你程式內所有設定,不會移除任何媒體檔案。 + 我如何讓某個相冊總是出現在頂端? + 你可以長按想要的相冊,然後在操作選單中選擇[圖釘]圖示,就會釘選於頂端。你也能釘選多個資料夾,釘選的項目會依預設的排序方法來排序。 + 我如何快轉影片? + 你可以點擊進度條附近的當前或總時長文字,影片就會快轉或倒轉。 + 隱藏和排除資料夾,兩者有什麼不同? + [排除]只在簡易相簿中避免顯示出來;而[隱藏]則作用於整個系統,資料夾也會被其他相簿隱藏。這是藉由在指定資料夾內建立一個\".nomedia\"空白檔案來進行隱藏,你之後也能用任何檔案管理器移除。 + 為什麼有些音樂專輯封面或貼圖的資料夾會出現? + 這情況可能發生,你會看到一些異常的相冊出現。你可以長按再選擇[排除]來輕易排除他們。在下個對話框,你可以選擇上層資料夾,有可能讓其他相關相冊也避免出現。 + 有一個圖片資料夾沒有顯示出來,怎麼辦? + 可能有多種原因,不過很好解決。只要到[設定] -> [管理包含資料夾],選擇[加號]然後導引到需要的資料夾。 + 如果我只想看到幾個特定的資料夾,怎麼做? + 在[包含資料夾]內添加資料夾並不會自動排除任何東西。你能做的是到[設定] -> [管理排除資料夾],排除根目錄 \"/\",然後在[設定] -> [管理包含資料夾]添加想要的資料夾。 + 那樣的話就只有選擇的資料夾可見。因為排除和包含都是遞迴的,如果一個資料夾被排除又被包含,則會顯示出來。 + 全螢幕圖片有雜質,我有辦法提高品質嗎? + 可啊,[設定]內有個開關叫做「可深度縮放的圖片用品質更佳的來取代」,你能用用看。這會提高圖片的品質,不過一旦你放大太多就會模糊掉。 + 一個用來瀏覽相片和影片,且沒有廣告的相簿。 一個適合用來瀏覽相片和影片的簡單工具。可以根據日期、大小、名稱來遞增或遞減排序項目,相片能被縮放。媒體檔案會依畫面大小呈現在數個欄位內,你可以使用縮放手勢來改變欄數。媒體檔案可以重新命名、分享、刪除、複製、移動;圖片還能縮放、旋轉、翻轉,或者直接設為桌布。 - 這相簿也支援第三方應用,像是預覽圖片/影片、添加電子信箱附件...等功能,日常使用上相當適合。 + 這相簿也支援第三方使用,像是預覽圖片/影片、添加電子信箱附件...等功能,日常使用上相當適合。 指紋權限用來鎖定隱藏的項目或是整個程式。 - 優點包含沒廣告,也沒非必要的權限,而且完全開放原始碼,並提供自訂顏色。 + 不包含廣告,也沒非必要的權限,而且完全開放原始碼,並提供自訂顏色。 - 這只是一個大系列應用程式的其中一項程式,你可以在這發現更多 http://www.simplemobiletools.com + 這程式只是一個大系列應用程式中的其中一項,你可以在這發現更多 http://www.simplemobiletools.com + Added toggles for disabling Pull-to-refresh and permanent Delete dialog confirmation skipping Added a toggle for replacing deep zoomable images with better quality ones\n Added a toggle for hiding Extended details when the statusbar is hidden\n diff --git a/app/src/main/res/values/integers.xml b/app/src/main/res/values/integers.xml index e27e3e8f5..1ba77d374 100644 --- a/app/src/main/res/values/integers.xml +++ b/app/src/main/res/values/integers.xml @@ -3,4 +3,6 @@ 3 3 4 + + 1026 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index abf2cb0ca..777a359b9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -143,6 +143,28 @@ Fullscreen media Extended details + + How can I make Simple Gallery the default device gallery? + First you have to find the currently default gallery in the Apps section of your device settings, look for a button that says something like \"Open by default\", click on it, then select \"Clear defaults\". + The next time you will try opening an image or video you should see an app picker, where you can select Simple Gallery and make it the default app. + I locked the app with a password, but I forgot it. What can I do? + You can solve it in 2 ways. You can either reinstall the app, or find the app in your device settings and select \"Clear data\". It will reset all your settings, it will not remove any media files. + How can I make an album always appear at the top? + You can long press the desired album and select the Pin icon at the actionmenu, that will pin it to the top. You can pin multiple folders too, pinned items will be sorted by the default sorting method. + How can I fast-forward videos? + You can click on the current or max duration texts near the seekbar, that will move the video either backward, or forward. + What is the difference between hiding and excluding a folder? + Exclude prevents displaying the folder only in Simple Gallery, while Hide works system-wise and it hides the folder from other galleries too. It works by creating an empty \".nomedia\" file in the given folder, which you can then remove with any file manager too. + Why do folders with music cover art or stickers show up? + It can happen that you will see some unusual albums show up. You can easily exclude them by long pressing them and selecting Exclude. In the next dialog you can then select the parent folder, chances are it will prevent the other related albums showing up too. + A folder with images isn\'t showing up, what can I do? + That can have multiple reasons, but solving it is easy. Just go in Settings -> Manage Included Folders, select Plus and navigate to the required folder. + What if I want just a few particular folders visible? + Adding a folder at the Included Folders doesn\'t automatically exclude anything. What you can do is go in Settings -> Manage Excluded Folders, exclude the root folder \"/\", then add the desired folders at Settings -> Manage Included Folders. + That will make only the selected folders visible, as both excluding and including are recursive and if a folder is both excluded and included, it will show up. + Fullscreen images have weird artifacts, can I somehow improve the quality? + Yea, there is a toggle in Settings saying \"Replace deep zoomable images with better quality ones\", you can use that. It will improve the quality of the images, but they will get blurred once you try zooming in too much. + A gallery for viewing photos and videos without ads.