diff --git a/CHANGELOG.md b/CHANGELOG.md index 71859cfcc..c72acc511 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,27 @@ Changelog ========== +Version 4.3.5 *(2018-07-17)* +---------------------------- + + * Fixed some Recycle bin related issues + * A few more UX and stability improvements + +Version 4.3.4 *(2018-07-15)* +---------------------------- + + * Fixed disappearing launcher icon after changing its color on some devices + * Fixed some video related errors + * Added "Set as" as an available action at the fullscreen bottom actions + * Do the appropriate actions at trying to delete the Recycle Bin or Favorites folders + * Fixed a glitch with some panorama images not recognized properly + * Avoid blank screen at toggling "Temporarily show hidden" + +Version 4.3.3 *(2018-07-06)* +---------------------------- + + * Couple stability improvements and glitch fixes + Version 4.3.2 *(2018-07-04)* ---------------------------- diff --git a/app/build.gradle b/app/build.gradle index 93eefa930..8ff84d38f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.simplemobiletools.gallery" minSdkVersion 16 targetSdkVersion 27 - versionCode 184 - versionName "4.3.2" + versionCode 187 + versionName "4.3.5" multiDexEnabled true setProperty("archivesBaseName", "gallery") } @@ -47,7 +47,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.3.27' + implementation 'com.simplemobiletools:commons:4.5.3' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' @@ -57,6 +57,7 @@ dependencies { implementation 'com.google.android.exoplayer:exoplayer-core:2.8.2' implementation 'com.google.vr:sdk-panowidget:1.150.0' implementation 'org.apache.sanselan:sanselan:0.97-incubator' + implementation 'info.androidhive:imagefilters:1.0.7' kapt "android.arch.persistence.room:compiler:1.1.1" implementation "android.arch.persistence.room:runtime:1.1.1" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 633440e5e..e58d5e3a1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -7,6 +7,9 @@ + @@ -18,17 +21,12 @@ android:label="@string/app_launcher_name" android:roundIcon="@mipmap/ic_launcher" android:supportsRtl="true" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + tools:replace="android:label"> - - - - - - + android:theme="@style/SplashTheme"/> - - - - - - - - + + + + + + + crop_image_view.getCroppedImageAsync() - R.id.rotate -> crop_image_view.rotateImage(90) - R.id.resize -> resizeImage() - R.id.flip_horizontally -> flipImage(true) - R.id.flip_vertically -> flipImage(false) + R.id.save_as -> saveImage() R.id.edit -> editWith() else -> return super.onOptionsItemSelected(item) } return true } + private fun loadDefaultImageView() { + default_image_view.beVisible() + crop_image_view.beGone() + + val options = RequestOptions() + .skipMemoryCache(true) + .diskCacheStrategy(DiskCacheStrategy.NONE) + + Glide.with(this) + .asBitmap() + .load(uri) + .apply(options) + .listener(object : RequestListener { + override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean) = false + + override fun onResourceReady(bitmap: Bitmap?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { + val currentFilter = getFiltersAdapter()?.getCurrentFilter() + if (initialBitmap != null && currentFilter != null && currentFilter.filter.name != getString(R.string.none)) { + default_image_view.onGlobalLayout { + applyFilter(currentFilter) + } + } else { + initialBitmap = bitmap + } + + if (isCropIntent) { + loadCropImageView() + bottom_primary_filter.beGone() + bottomCropRotateClicked() + } + + return false + } + }).into(default_image_view) + } + + private fun loadCropImageView() { + default_image_view.beGone() + crop_image_view.apply { + beVisible() + setOnCropImageCompleteListener(this@EditActivity) + setImageUriAsync(uri) + guidelines = CropImageView.Guidelines.ON + + if (isCropIntent && shouldCropSquare()) { + currAspectRatio = ASPECT_RATIO_ONE_ONE + setFixedAspectRatio(true) + bottom_aspect_ratio.beGone() + } + } + } + + private fun saveImage() { + if (crop_image_view.isVisible()) { + crop_image_view.getCroppedImageAsync() + } else { + val currentFilter = getFiltersAdapter()?.getCurrentFilter() ?: return + val filePathGetter = getNewFilePath() + SaveAsDialog(this, filePathGetter.first, filePathGetter.second) { + toast(R.string.saving) + + // clean up everything to free as much memory as possible + default_image_view.setImageResource(0) + crop_image_view.setImageBitmap(null) + bottom_actions_filter_list.adapter = null + bottom_actions_filter_list.beGone() + + Thread { + val originalBitmap = Glide.with(applicationContext).asBitmap().load(uri).submit(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL).get() + currentFilter.filter.processFilter(originalBitmap) + saveBitmapToFile(originalBitmap, it, false) + }.start() + } + } + } + + private fun getFiltersAdapter() = bottom_actions_filter_list.adapter as? FiltersAdapter + + private fun setupBottomActions() { + setupPrimaryActionButtons() + setupCropRotateActionButtons() + setupAspectRatioButtons() + } + + private fun setupPrimaryActionButtons() { + bottom_primary_filter.setOnClickListener { + bottomFilterClicked() + } + + bottom_primary_crop_rotate.setOnClickListener { + bottomCropRotateClicked() + } + } + + private fun bottomFilterClicked() { + currPrimaryAction = if (currPrimaryAction == PRIMARY_ACTION_FILTER) { + PRIMARY_ACTION_NONE + } else { + PRIMARY_ACTION_FILTER + } + updatePrimaryActionButtons() + } + + private fun bottomCropRotateClicked() { + currPrimaryAction = if (currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE) { + PRIMARY_ACTION_NONE + } else { + PRIMARY_ACTION_CROP_ROTATE + } + updatePrimaryActionButtons() + } + + private fun setupCropRotateActionButtons() { + bottom_rotate.setOnClickListener { + crop_image_view.rotateImage(90) + } + + bottom_resize.beGoneIf(isCropIntent) + bottom_resize.setOnClickListener { + resizeImage() + } + + bottom_flip_horizontally.setOnClickListener { + crop_image_view.flipImageHorizontally() + } + + bottom_flip_vertically.setOnClickListener { + crop_image_view.flipImageVertically() + } + + bottom_aspect_ratio.setOnClickListener { + currCropRotateAction = if (currCropRotateAction == CROP_ROTATE_ASPECT_RATIO) { + crop_image_view.guidelines = CropImageView.Guidelines.OFF + bottom_aspect_ratios.beGone() + CROP_ROTATE_NONE + } else { + crop_image_view.guidelines = CropImageView.Guidelines.ON + bottom_aspect_ratios.beVisible() + CROP_ROTATE_ASPECT_RATIO + } + updateCropRotateActionButtons() + } + } + + private fun setupAspectRatioButtons() { + bottom_aspect_ratio_free.setOnClickListener { + updateAspectRatio(ASPECT_RATIO_FREE) + } + + bottom_aspect_ratio_one_one.setOnClickListener { + updateAspectRatio(ASPECT_RATIO_ONE_ONE) + } + + bottom_aspect_ratio_four_three.setOnClickListener { + updateAspectRatio(ASPECT_RATIO_FOUR_THREE) + } + + bottom_aspect_ratio_sixteen_nine.setOnClickListener { + updateAspectRatio(ASPECT_RATIO_SIXTEEN_NINE) + } + updateAspectRatioButtons() + } + + private fun updatePrimaryActionButtons() { + if (crop_image_view.isGone() && currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE) { + loadCropImageView() + } else if (default_image_view.isGone() && currPrimaryAction == PRIMARY_ACTION_FILTER) { + loadDefaultImageView() + } + + arrayOf(bottom_primary_filter, bottom_primary_crop_rotate).forEach { + it.applyColorFilter(Color.WHITE) + } + + val currentPrimaryActionButton = when (currPrimaryAction) { + PRIMARY_ACTION_FILTER -> bottom_primary_filter + PRIMARY_ACTION_CROP_ROTATE -> bottom_primary_crop_rotate + else -> null + } + + currentPrimaryActionButton?.applyColorFilter(config.primaryColor) + bottom_editor_filter_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_FILTER) + bottom_editor_crop_rotate_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE) + + if (currPrimaryAction == PRIMARY_ACTION_FILTER && bottom_actions_filter_list.adapter == null) { + Thread { + val size = resources.getDimension(R.dimen.bottom_filters_thumbnail_height).toInt() + val bitmap = Glide.with(this).asBitmap().load(uri).submit(size, size).get() + runOnUiThread { + val filterThumbnailsManager = FilterThumbnailsManager() + filterThumbnailsManager.clearThumbs() + + val noFilter = Filter(getString(R.string.none)) + filterThumbnailsManager.addThumb(FilterItem(bitmap, noFilter)) + + FilterPack.getFilterPack(this).forEach { + val filterItem = FilterItem(bitmap, it) + filterThumbnailsManager.addThumb(filterItem) + } + + val filterItems = filterThumbnailsManager.processThumbs() + val adapter = FiltersAdapter(applicationContext, filterItems) { + applyFilter(it) + } + + bottom_actions_filter_list.adapter = adapter + adapter.notifyDataSetChanged() + } + }.start() + } + + if (currPrimaryAction != PRIMARY_ACTION_CROP_ROTATE) { + bottom_aspect_ratios.beGone() + currCropRotateAction = CROP_ROTATE_NONE + updateCropRotateActionButtons() + } + } + + private fun applyFilter(filterItem: FilterItem) { + val newBitmap = Bitmap.createBitmap(initialBitmap) + default_image_view.setImageBitmap(filterItem.filter.processFilter(newBitmap)) + } + + private fun updateAspectRatio(aspectRatio: Int) { + currAspectRatio = aspectRatio + updateAspectRatioButtons() + + crop_image_view.apply { + if (aspectRatio == ASPECT_RATIO_FREE) { + setFixedAspectRatio(false) + } else { + val newAspectRatio = when (aspectRatio) { + ASPECT_RATIO_ONE_ONE -> Pair(1, 1) + ASPECT_RATIO_FOUR_THREE -> Pair(4, 3) + else -> Pair(16, 9) + } + + setAspectRatio(newAspectRatio.first, newAspectRatio.second) + } + } + } + + private fun updateAspectRatioButtons() { + arrayOf(bottom_aspect_ratio_free, bottom_aspect_ratio_one_one, bottom_aspect_ratio_four_three, bottom_aspect_ratio_sixteen_nine).forEach { + it.setTextColor(Color.WHITE) + } + + val currentAspectRatioButton = when (currAspectRatio) { + ASPECT_RATIO_FREE -> bottom_aspect_ratio_free + ASPECT_RATIO_ONE_ONE -> bottom_aspect_ratio_one_one + ASPECT_RATIO_FOUR_THREE -> bottom_aspect_ratio_four_three + else -> bottom_aspect_ratio_sixteen_nine + } + + currentAspectRatioButton.setTextColor(config.primaryColor) + } + + private fun updateCropRotateActionButtons() { + arrayOf(bottom_aspect_ratio).forEach { + it.applyColorFilter(Color.WHITE) + } + + val primaryActionView = when (currCropRotateAction) { + CROP_ROTATE_ASPECT_RATIO -> bottom_aspect_ratio + else -> null + } + + primaryActionView?.applyColorFilter(config.primaryColor) + } + private fun resizeImage() { val point = getAreaSize() if (point == null) { @@ -160,7 +467,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener if (result.error == null) { if (isCropIntent) { if (saveUri.scheme == "file") { - saveBitmapToFile(result.bitmap, saveUri.path) + saveBitmapToFile(result.bitmap, saveUri.path, true) } else { var inputStream: InputStream? = null var outputStream: OutputStream? = null @@ -184,27 +491,12 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } } else if (saveUri.scheme == "file") { SaveAsDialog(this, saveUri.path, true) { - saveBitmapToFile(result.bitmap, it) + saveBitmapToFile(result.bitmap, it, true) } } else if (saveUri.scheme == "content") { - var newPath = applicationContext.getRealPathFromURI(saveUri) ?: "" - var shouldAppendFilename = true - if (newPath.isEmpty()) { - val filename = applicationContext.getFilenameFromContentUri(saveUri) ?: "" - if (filename.isNotEmpty()) { - val path = if (intent.extras?.containsKey(REAL_FILE_PATH) == true) intent.getStringExtra(REAL_FILE_PATH).getParentPath() else internalStoragePath - newPath = "$path/$filename" - shouldAppendFilename = false - } - } - - if (newPath.isEmpty()) { - newPath = "$internalStoragePath/${getCurrentFormattedDateTime()}.${saveUri.toString().getFilenameExtension()}" - shouldAppendFilename = false - } - - SaveAsDialog(this, newPath, shouldAppendFilename) { - saveBitmapToFile(result.bitmap, it) + val filePathGetter = getNewFilePath() + SaveAsDialog(this, filePathGetter.first, filePathGetter.second) { + saveBitmapToFile(result.bitmap, it, true) } } else { toast(R.string.unknown_file_location) @@ -214,14 +506,34 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } } - private fun saveBitmapToFile(bitmap: Bitmap, path: String) { + private fun getNewFilePath(): Pair { + var newPath = applicationContext.getRealPathFromURI(saveUri) ?: "" + var shouldAppendFilename = true + if (newPath.isEmpty()) { + val filename = applicationContext.getFilenameFromContentUri(saveUri) ?: "" + if (filename.isNotEmpty()) { + val path = if (intent.extras?.containsKey(REAL_FILE_PATH) == true) intent.getStringExtra(REAL_FILE_PATH).getParentPath() else internalStoragePath + newPath = "$path/$filename" + shouldAppendFilename = false + } + } + + if (newPath.isEmpty()) { + newPath = "$internalStoragePath/${getCurrentFormattedDateTime()}.${saveUri.toString().getFilenameExtension()}" + shouldAppendFilename = false + } + + return Pair(newPath, shouldAppendFilename) + } + + private fun saveBitmapToFile(bitmap: Bitmap, path: String, showSavingToast: Boolean) { try { Thread { val file = File(path) val fileDirItem = FileDirItem(path, path.getFilenameFromPath()) getFileOutputStream(fileDirItem, true) { if (it != null) { - saveBitmap(file, bitmap, it) + saveBitmap(file, bitmap, it, showSavingToast) } else { toast(R.string.image_editing_failed) } @@ -234,8 +546,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } } - private fun saveBitmap(file: File, bitmap: Bitmap, out: OutputStream) { - toast(R.string.saving) + private fun saveBitmap(file: File, bitmap: Bitmap, out: OutputStream, showSavingToast: Boolean) { + if (showSavingToast) { + toast(R.string.saving) + } + if (resizeWidth > 0 && resizeHeight > 0) { val resized = Bitmap.createScaledBitmap(bitmap, resizeWidth, resizeHeight, false) resized.compress(file.absolutePath.getCompressionFormat(), 90, out) @@ -247,14 +562,6 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener out.close() } - private fun flipImage(horizontally: Boolean) { - if (horizontally) { - crop_image_view.flipImageHorizontally() - } else { - crop_image_view.flipImageVertically() - } - } - private fun editWith() { 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 22c5853e7..b4434fc41 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -58,6 +58,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private var mLoadedInitialPhotos = false private var mIsPasswordProtectionPending = false private var mWasProtectionHandled = false + private var mShouldStopFetching = false private var mLatestMediaId = 0L private var mLatestMediaDateId = 0L private var mLastMediaHandler = Handler() @@ -323,6 +324,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { return } + mShouldStopFetching = true mIsGettingDirs = true val getImagesOnly = mIsPickImageIntent || mIsGetImageContentIntent val getVideosOnly = mIsPickVideoIntent || mIsGetVideoContentIntent @@ -347,7 +349,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private fun showFilterMediaDialog() { FilterMediaDialog(this) { - mLoadedInitialPhotos = false + mShouldStopFetching = true directories_refresh_layout.isRefreshing = true directories_grid.adapter = null getDirectories() @@ -662,6 +664,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private fun gotDirectories(newDirs: ArrayList) { // if hidden item showing is disabled but all Favorite items are hidden, hide the Favorites folder + mIsGettingDirs = false + mShouldStopFetching = false if (!config.shouldShowHidden) { val favoritesFolder = newDirs.firstOrNull { it.areFavorites() } if (favoritesFolder != null && favoritesFolder.tmb.getFilenameFromPath().startsWith('.')) { @@ -696,6 +700,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { try { for (directory in dirs) { + if (mShouldStopFetching) { + return + } + val curMedia = mediaFetcher.getFilesFrom(directory.path, getImagesOnly, getVideosOnly, getProperDateTaken, favoritePaths) val newDir = if (curMedia.isEmpty()) { directory @@ -741,13 +749,22 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { val foldersToScan = mediaFetcher.getFoldersToScan() foldersToScan.add(FAVORITES) - foldersToScan.add(RECYCLE_BIN) + if (config.showRecycleBinAtFolders) { + foldersToScan.add(RECYCLE_BIN) + } else { + foldersToScan.remove(RECYCLE_BIN) + } + dirs.forEach { foldersToScan.remove(it.path) } // check the remaining folders which were not cached at all yet for (folder in foldersToScan) { + if (mShouldStopFetching) { + return + } + val newMedia = mediaFetcher.getFilesFrom(folder, getImagesOnly, getVideosOnly, getProperDateTaken, favoritePaths) if (newMedia.isEmpty()) { continue @@ -771,7 +788,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } } - mIsGettingDirs = false mLoadedInitialPhotos = true checkLastMediaChanged() @@ -798,7 +814,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } private fun showSortedDirs(dirs: ArrayList) { - var sortedDirs = getSortedDirectories(dirs).clone() as ArrayList + var sortedDirs = getSortedDirectories(dirs) sortedDirs = sortedDirs.distinctBy { it.path.getDistinctPath() } as ArrayList runOnUiThread { @@ -836,11 +852,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private fun setupAdapter(dirs: ArrayList) { val currAdapter = directories_grid.adapter - val directories = dirs.clone() as ArrayList if (currAdapter == null) { initZoomListener() val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller - DirectoryAdapter(this, directories, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) { + DirectoryAdapter(this, dirs.clone() as ArrayList, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) { val path = (it as Directory).path if (path != config.tempFolderPath) { itemClicked(path) @@ -850,7 +865,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { directories_grid.adapter = this } } else { - (currAdapter as DirectoryAdapter).updateDirs(directories) + (currAdapter as DirectoryAdapter).updateDirs(dirs) } getRecyclerAdapter()?.dirs?.apply { 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 11d2f36ad..e16f0bfc6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -261,7 +261,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { private fun setupSearch(menu: Menu) { val searchManager = getSystemService(Context.SEARCH_SERVICE) as SearchManager mSearchMenuItem = menu.findItem(R.id.search) - (mSearchMenuItem!!.actionView as SearchView).apply { + (mSearchMenuItem?.actionView as? SearchView)?.apply { setSearchableInfo(searchManager.getSearchableInfo(componentName)) isSubmitButtonEnabled = false setOnQueryTextListener(object : SearchView.OnQueryTextListener { @@ -317,7 +317,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { mPath.startsWith(OTG_PATH) -> mPath.trimEnd('/').substringAfterLast('/') else -> getHumanizedFilename(mPath) } - supportActionBar?.title = if (mShowAll) resources.getString(R.string.all_folders) else dirName + updateActionBarTitle(if (mShowAll) resources.getString(R.string.all_folders) else dirName) getMedia() setupLayoutManager() } else { @@ -338,7 +338,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { if (currAdapter == null) { initZoomListener() val fastscroller = if (config.scrollHorizontally) media_horizontal_fastscroller else media_vertical_fastscroller - MediaAdapter(this, mMedia, this, mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent, mAllowPickingMultiple, media_grid, fastscroller) { + MediaAdapter(this, mMedia.clone() as ArrayList, this, mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent, + mAllowPickingMultiple, media_grid, fastscroller) { if (it is Medium) { itemClicked(it.path) } @@ -806,7 +807,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { mLatestMediaId = getLatestMediaId() mLatestMediaDateId = getLatestMediaByDateId() if (!isFromCache) { - val mediaToInsert = (mMedia.clone() as ArrayList).filter { it is Medium && it.deletedTS == 0L }.map { it as Medium } + val mediaToInsert = (mMedia).filter { it is Medium && it.deletedTS == 0L }.map { it as Medium } galleryDB.MediumDao().insertAll(mediaToInsert) } } @@ -816,7 +817,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { val deletingItems = resources.getQuantityString(R.plurals.deleting_items, filtered.size, filtered.size) toast(deletingItems) - if (config.useRecycleBin && !filtered.first().path.startsWith(filesDir.toString())) { + if (config.useRecycleBin && !filtered.first().path.startsWith(filesDir.absolutePath)) { movePathsInRecycleBin(filtered.map { it.path } as ArrayList) { if (it) { deleteFilteredFiles(filtered) 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 10c636fea..a3657295d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -48,8 +48,6 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList finish() } } - - initBottomActions() } override fun onResume() { @@ -88,14 +86,15 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList showSystemUI(true) val bundle = Bundle() val file = File(mUri.toString()) + val filename = getFilenameFromUri(mUri!!) val type = when { - file.isImageFast() -> TYPE_IMAGES - file.isVideoFast() -> TYPE_VIDEOS - file.isGif() -> TYPE_GIFS + filename.isImageFast() -> TYPE_IMAGES + filename.isVideoFast() -> TYPE_VIDEOS + filename.isGif() -> TYPE_GIFS else -> TYPE_RAWS } - mMedium = Medium(null, getFilenameFromUri(mUri!!), mUri.toString(), mUri!!.path.getParentPath(), 0, 0, file.length(), type, false, 0L) + mMedium = Medium(null, filename, mUri.toString(), mUri!!.path.getParentPath(), 0, 0, file.length(), type, false, 0L) supportActionBar?.title = mMedium!!.name bundle.putSerializable(MEDIUM, mMedium) @@ -114,6 +113,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList val isFullscreen = visibility and View.SYSTEM_UI_FLAG_FULLSCREEN != 0 mFragment?.fullscreenToggled(isFullscreen) } + + initBottomActions() } override fun onConfigurationChanged(newConfig: Configuration?) { @@ -132,12 +133,13 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.photo_video_menu, menu) + val visibleBottomActions = if (config.bottomActions) config.visibleBottomActions else 0 menu.apply { - findItem(R.id.menu_set_as).isVisible = mMedium?.isImage() == true - findItem(R.id.menu_edit).isVisible = mMedium?.isImage() == true && mUri?.scheme == "file" && !config.bottomActions - findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file" - findItem(R.id.menu_share).isVisible = !config.bottomActions + findItem(R.id.menu_set_as).isVisible = mMedium?.isImage() == true && visibleBottomActions and BOTTOM_ACTION_SET_AS == 0 + findItem(R.id.menu_edit).isVisible = mMedium?.isImage() == true && mUri?.scheme == "file" && visibleBottomActions and BOTTOM_ACTION_EDIT == 0 + findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file" && visibleBottomActions and BOTTOM_ACTION_PROPERTIES == 0 + findItem(R.id.menu_share).isVisible = visibleBottomActions and BOTTOM_ACTION_SHARE == 0 } return true @@ -183,7 +185,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList } val visibleBottomActions = if (config.bottomActions) config.visibleBottomActions else 0 - bottom_edit.beVisibleIf(visibleBottomActions and BOTTOM_ACTION_EDIT != 0) + bottom_edit.beVisibleIf(visibleBottomActions and BOTTOM_ACTION_EDIT != 0 && mMedium?.isImage() == true) bottom_edit.setOnClickListener { if (mUri != null && bottom_actions.alpha == 1f) { openEditor(mUri!!.toString()) @@ -196,6 +198,11 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList sharePath(mUri!!.toString()) } } + + bottom_set_as.beVisibleIf(visibleBottomActions and BOTTOM_ACTION_SET_AS != 0 && mMedium?.isImage() == true) + bottom_set_as.setOnClickListener { + setAs(mUri!!.toString()) + } } override fun fragmentClicked() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt index 763ec25c8..25070a812 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt @@ -16,7 +16,7 @@ import com.simplemobiletools.commons.helpers.isNougatPlus import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.gallery.R import com.theartofdev.edmodo.cropper.CropImageView -import kotlinx.android.synthetic.main.view_crop_image.* +import kotlinx.android.synthetic.main.activity_edit.* class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener { private val PICK_IMAGE = 1 @@ -28,7 +28,7 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setContentView(R.layout.view_crop_image) + setContentView(R.layout.activity_set_wallpaper) if (intent.data == null) { val pickIntent = Intent(applicationContext, MainActivity::class.java) 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 db12b773a..13a79370e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -38,6 +38,7 @@ class SettingsActivity : SimpleActivity() { override fun onResume() { super.onResume() + setupPurchaseThankYou() setupCustomizeColors() setupUseEnglish() setupAvoidWhatsNew() @@ -74,6 +75,7 @@ class SettingsActivity : SimpleActivity() { setupSkipDeleteConfirmation() setupManageBottomActions() setupUseRecycleBin() + setupShowRecycleBin() setupEmptyRecycleBin() updateTextColors(settings_holder) setupSectionColors() @@ -87,6 +89,13 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupPurchaseThankYou() { + settings_purchase_thank_you_holder.beVisibleIf(config.appRunCount > 10 && !isThankYouInstalled()) + settings_purchase_thank_you_holder.setOnClickListener { + launchPurchaseThankYouIntent() + } + } + private fun setupCustomizeColors() { settings_customize_colors_holder.setOnClickListener { startCustomizationActivity() @@ -433,6 +442,7 @@ class SettingsActivity : SimpleActivity() { private fun setupUseRecycleBin() { settings_empty_recycle_bin_holder.beVisibleIf(config.useRecycleBin) + settings_show_recycle_bin_holder.beVisibleIf(config.useRecycleBin) settings_use_recycle_bin.isChecked = config.useRecycleBin settings_use_recycle_bin_holder.setOnClickListener { settings_use_recycle_bin.toggle() @@ -441,6 +451,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupShowRecycleBin() { + settings_show_recycle_bin.isChecked = config.showRecycleBinAtFolders + settings_show_recycle_bin_holder.setOnClickListener { + settings_show_recycle_bin.toggle() + config.showRecycleBinAtFolders = settings_show_recycle_bin.isChecked + } + } + private fun setupEmptyRecycleBin() { Thread { mRecycleBinContentSize = galleryDB.MediumDao().getDeletedMedia().sumByLong { it.size } 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 87e029a27..f6756927b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -230,6 +230,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } refreshViewPager() + view_pager.offscreenPageLimit = 2 if (config.blackBackground) { view_pager.background = ColorDrawable(Color.BLACK) @@ -295,12 +296,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View findItem(R.id.menu_edit).isVisible = visibleBottomActions and BOTTOM_ACTION_EDIT == 0 findItem(R.id.menu_rename).isVisible = visibleBottomActions and BOTTOM_ACTION_RENAME == 0 findItem(R.id.menu_rotate).isVisible = currentMedium.isImage() && visibleBottomActions and BOTTOM_ACTION_ROTATE == 0 + findItem(R.id.menu_set_as).isVisible = visibleBottomActions and BOTTOM_ACTION_SET_AS == 0 findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0 findItem(R.id.menu_hide).isVisible = !currentMedium.isHidden() && visibleBottomActions and BOTTOM_ACTION_TOGGLE_VISIBILITY == 0 findItem(R.id.menu_unhide).isVisible = currentMedium.isHidden() && visibleBottomActions and BOTTOM_ACTION_TOGGLE_VISIBILITY == 0 findItem(R.id.menu_add_to_favorites).isVisible = !currentMedium.isFavorite && visibleBottomActions and BOTTOM_ACTION_TOGGLE_FAVORITE == 0 findItem(R.id.menu_remove_from_favorites).isVisible = currentMedium.isFavorite && visibleBottomActions and BOTTOM_ACTION_TOGGLE_FAVORITE == 0 - findItem(R.id.menu_restore_file).isVisible = currentMedium.path.startsWith(filesDir.toString()) + findItem(R.id.menu_restore_file).isVisible = currentMedium.path.startsWith(filesDir.absolutePath) findItem(R.id.menu_change_orientation).isVisible = mRotationDegrees == 0 && visibleBottomActions and BOTTOM_ACTION_CHANGE_ORIENTATION == 0 findItem(R.id.menu_change_orientation).icon = resources.getDrawable(getChangeOrientationIcon()) findItem(R.id.menu_rotate).setShowAsAction( @@ -585,7 +587,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } } - val tmpPath = "$filesDir/.tmp_${newPath.getFilenameFromPath()}" + val tmpPath = "${filesDir.absolutePath}/.tmp_${newPath.getFilenameFromPath()}" val tmpFileDirItem = FileDirItem(tmpPath, tmpPath.getFilenameFromPath()) try { getFileOutputStream(tmpFileDirItem) { @@ -841,6 +843,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View bottom_rename.setOnClickListener { renameFile() } + + bottom_set_as.beVisibleIf(visibleBottomActions and BOTTOM_ACTION_SET_AS != 0) + bottom_set_as.setOnClickListener { + setAs(getCurrentPath()) + } } private fun updateBottomActionIcons(medium: Medium?) { @@ -915,7 +922,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun deleteConfirmed() { val path = getCurrentMedia().getOrNull(mPos)?.path ?: return - if (getIsPathDirectory(path)) { + if (getIsPathDirectory(path) || !path.isImageVideoGif()) { return } @@ -1104,10 +1111,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {} override fun onPageSelected(position: Int) { - if (view_pager.offscreenPageLimit == 1) { - view_pager.offscreenPageLimit = 2 - } - if (mPos != position) { mPos = position updateActionbarTitle() 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 6a165bdeb..37de4495f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -72,6 +72,10 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList renameDir() R.id.cab_pin -> pinFolders(true) R.id.cab_unpin -> pinFolders(false) - R.id.cab_hide -> toggleFoldersVisibility(true) - R.id.cab_empty_recycle_bin -> emptyRecycleBin() + R.id.cab_empty_recycle_bin -> tryEmptyRecycleBin(true) R.id.cab_empty_disable_recycle_bin -> emptyAndDisableRecycleBin() + R.id.cab_hide -> toggleFoldersVisibility(true) R.id.cab_unhide -> toggleFoldersVisibility(false) R.id.cab_exclude -> tryExcludeFolder() R.id.cab_copy_to -> copyMoveTo(true) @@ -214,11 +218,19 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList { val paths = HashSet(selectedPositions.size) - selectedPositions.forEach { paths.add(dirs[it].path) } + selectedPositions.forEach { + (dirs.getOrNull(it))?.apply { + paths.add(path) + } + } return paths } fun updateDirs(newDirs: ArrayList) { - if (newDirs.hashCode() != currentDirectoriesHash) { - currentDirectoriesHash = newDirs.hashCode() - dirs = newDirs + val directories = newDirs.clone() as ArrayList + if (directories.hashCode() != currentDirectoriesHash) { + currentDirectoriesHash = directories.hashCode() + dirs = directories notifyDataSetChanged() finishActMode() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/FiltersAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/FiltersAdapter.kt new file mode 100644 index 000000000..e8dfd83ef --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/FiltersAdapter.kt @@ -0,0 +1,60 @@ +package com.simplemobiletools.gallery.adapters + +import android.content.Context +import android.graphics.drawable.Drawable +import android.support.v7.widget.RecyclerView +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import com.simplemobiletools.gallery.R +import com.simplemobiletools.gallery.interfaces.FilterAdapterListener +import com.simplemobiletools.gallery.models.FilterItem +import kotlinx.android.synthetic.main.editor_filter_item.view.* +import java.util.* + +class FiltersAdapter(val context: Context, val filterItems: ArrayList, val itemClick: (FilterItem) -> Unit) : RecyclerView.Adapter(), + FilterAdapterListener { + + private var currentSelection = filterItems.first() + private var strokeBackground = context.resources.getDrawable(R.drawable.stroke_background) + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + holder.bindView(filterItems[position], strokeBackground) + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { + val view = LayoutInflater.from(parent.context).inflate(R.layout.editor_filter_item, parent, false) + return ViewHolder(view, this) + } + + override fun getItemCount() = filterItems.size + + override fun getCurrentFilter() = currentSelection + + override fun setCurrentFilter(filterItem: FilterItem) { + if (currentSelection != filterItem) { + currentSelection = filterItem + notifyDataSetChanged() + itemClick.invoke(filterItem) + } + } + + class ViewHolder(view: View, val filterAdapterListener: FilterAdapterListener) : RecyclerView.ViewHolder(view) { + fun bindView(filterItem: FilterItem, strokeBackground: Drawable): View { + itemView.apply { + editor_filter_item_label.text = filterItem.filter.name + editor_filter_item_thumbnail.setImageBitmap(filterItem.bitmap) + editor_filter_item_thumbnail.background = if (filterAdapterListener.getCurrentFilter() == filterItem) { + strokeBackground + } else { + null + } + + setOnClickListener { + filterAdapterListener.setCurrentFilter(filterItem) + } + } + return itemView + } + } +} 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 e087907f1..94b93fb71 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -109,7 +109,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList 0 - findItem(R.id.cab_restore_recycle_bin_files).isVisible = getSelectedPaths().all { it.startsWith(activity.filesDir.toString()) } + findItem(R.id.cab_restore_recycle_bin_files).isVisible = getSelectedPaths().all { it.startsWith(activity.filesDir.absolutePath) } checkHideBtnVisibility(this) checkFavoriteBtnVisibility(this) @@ -289,7 +289,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList fun updateMedia(newMedia: ArrayList) { - if (newMedia.hashCode() != currentMediaHash) { - currentMediaHash = newMedia.hashCode() + val thumbnailItems = newMedia.clone() as ArrayList + if (thumbnailItems.hashCode() != currentMediaHash) { + currentMediaHash = thumbnailItems.hashCode() Handler().postDelayed({ - media = newMedia + media = thumbnailItems enableInstantLoad() notifyDataSetChanged() finishActMode() 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 e4b0aa1d8..26004f645 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt @@ -5,7 +5,9 @@ import android.os.AsyncTask import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.extensions.getFavoritePaths +import com.simplemobiletools.gallery.helpers.FAVORITES import com.simplemobiletools.gallery.helpers.MediaFetcher +import com.simplemobiletools.gallery.helpers.RECYCLE_BIN import com.simplemobiletools.gallery.helpers.SHOW_ALL import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.models.ThumbnailItem @@ -21,7 +23,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage val getProperDateTaken = context.config.getFileSorting(pathToUse) and SORT_BY_DATE_TAKEN != 0 val favoritePaths = context.getFavoritePaths() val media = if (showAll) { - val foldersToScan = mediaFetcher.getFoldersToScan() + val foldersToScan = mediaFetcher.getFoldersToScan().filter { it != RECYCLE_BIN && it != FAVORITES } val media = ArrayList() foldersToScan.forEach { val newMedia = mediaFetcher.getFilesFrom(it, isPickImage, isPickVideo, getProperDateTaken, favoritePaths) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ManageBottomActionsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ManageBottomActionsDialog.kt index a9ef79936..920c3c404 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ManageBottomActionsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ManageBottomActionsDialog.kt @@ -25,6 +25,7 @@ class ManageBottomActionsDialog(val activity: BaseSimpleActivity, val callback: manage_bottom_actions_show_on_map.isChecked = actions and BOTTOM_ACTION_SHOW_ON_MAP != 0 manage_bottom_actions_toggle_visibility.isChecked = actions and BOTTOM_ACTION_TOGGLE_VISIBILITY != 0 manage_bottom_actions_rename.isChecked = actions and BOTTOM_ACTION_RENAME != 0 + manage_bottom_actions_set_as.isChecked = actions and BOTTOM_ACTION_SET_AS != 0 } AlertDialog.Builder(activity) @@ -60,6 +61,8 @@ class ManageBottomActionsDialog(val activity: BaseSimpleActivity, val callback: result += BOTTOM_ACTION_TOGGLE_VISIBILITY if (manage_bottom_actions_rename.isChecked) result += BOTTOM_ACTION_RENAME + if (manage_bottom_actions_set_as.isChecked) + result += BOTTOM_ACTION_SET_AS } activity.config.visibleBottomActions = result diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt index 80a0a53f7..653041574 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt @@ -61,7 +61,7 @@ class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: Stri return shownDirectories = dirs - val adapter = DirectoryAdapter(activity, dirs, null, view.directories_grid, true) { + val adapter = DirectoryAdapter(activity, dirs.clone() as ArrayList, null, view.directories_grid, true) { if ((it as Directory).path.trimEnd('/') == sourcePath) { activity.toast(R.string.source_and_destination_same) return@DirectoryAdapter diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt index 65cb91e25..1ccef0923 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt @@ -64,7 +64,7 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c return shownMedia = media - val adapter = MediaAdapter(activity, shownMedia, null, true, false, view.media_grid, null) { + val adapter = MediaAdapter(activity, shownMedia.clone() as ArrayList, null, true, false, view.media_grid, null) { if (it is Medium) { callback(it.path) dialog.dismiss() 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 224067c83..6da9f30e3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -151,6 +151,11 @@ fun BaseSimpleActivity.removeNoMedia(path: String, callback: (() -> Unit)? = nul fun BaseSimpleActivity.toggleFileVisibility(oldPath: String, hide: Boolean, callback: ((newPath: String) -> Unit)? = null) { val path = oldPath.getParentPath() var filename = oldPath.getFilenameFromPath() + if ((hide && filename.startsWith('.')) || (!hide && !filename.startsWith('.'))) { + callback?.invoke(oldPath) + return + } + filename = if (hide) { ".${filename.trimStart('.')}" } else { @@ -196,14 +201,16 @@ fun BaseSimpleActivity.tryDeleteFileDirItem(fileDirItem: FileDirItem, allowDelet fun BaseSimpleActivity.movePathsInRecycleBin(paths: ArrayList, callback: ((wasSuccess: Boolean) -> Unit)?) { Thread { + val mediumDao = galleryDB.MediumDao() var pathsCnt = paths.size paths.forEach { val file = File(it) - val internalFile = File(filesDir, it) + val internalFile = File(filesDir.absolutePath, it) try { - file.copyRecursively(internalFile, true) - galleryDB.MediumDao().updateDeleted(it, System.currentTimeMillis()) - pathsCnt-- + if (file.copyRecursively(internalFile, true)) { + mediumDao.updateDeleted(it, System.currentTimeMillis()) + pathsCnt-- + } } catch (ignored: Exception) { } } @@ -220,7 +227,7 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList, callback val mediumDao = galleryDB.MediumDao() paths.forEach { val source = it - val destination = it.removePrefix(filesDir.toString()) + val destination = it.removePrefix(filesDir.absolutePath) var inputStream: InputStream? = null var out: OutputStream? = null diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt index ced21949a..5fc78e20e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -288,6 +288,11 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly: } catch (e: SQLiteException) { ArrayList() } + + if (!config.showRecycleBinAtFolders) { + directories.removeAll { it.isRecycleBin() } + } + val shouldShowHidden = config.shouldShowHidden val excludedPaths = config.excludedFolders val includedPaths = config.includedFolders @@ -365,7 +370,7 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag val grouped = mediaFetcher.groupMedia(media, pathToUse) callback(grouped.clone() as ArrayList) - val recycleBinPath = filesDir.toString() + val recycleBinPath = filesDir.absolutePath media.filter { !getDoesFilePathExist(it.path) }.forEach { if (it.path.startsWith(recycleBinPath)) { mediumDao.deleteMediumPath(it.path.removePrefix(recycleBinPath)) @@ -402,7 +407,7 @@ fun Context.getFavoritePaths() = galleryDB.MediumDao().getFavoritePaths() as Arr fun Context.getUpdatedDeletedMedia(mediumDao: MediumDao): ArrayList { val media = mediumDao.getDeletedMedia() as ArrayList media.forEach { - it.path = File(filesDir, it.path).toString() + it.path = File(filesDir.absolutePath, it.path).toString() } return media } 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 13abaf0b5..b181e4ebc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -47,7 +47,9 @@ import java.io.File import java.io.FileOutputStream class PhotoFragment : ViewPagerFragment() { - private var DEFAULT_DOUBLE_TAP_ZOOM = 2f + private val DEFAULT_DOUBLE_TAP_ZOOM = 2f + private val ZOOMABLE_VIEW_LOAD_DELAY = 1500L + private var isFragmentVisible = false private var isFullscreen = false private var wasInit = false @@ -55,6 +57,7 @@ class PhotoFragment : ViewPagerFragment() { private var isPanorama = false private var imageOrientation = -1 private var gifDrawable: GifDrawable? = null + private var loadZoomableViewHandler = Handler() private var storedShowExtendedDetails = false private var storedHideExtendedDetails = false @@ -184,7 +187,9 @@ class PhotoFragment : ViewPagerFragment() { private fun photoFragmentVisibilityChanged(isVisible: Boolean) { if (isVisible) { - addZoomableView() + scheduleZoomableView() + } else { + loadZoomableViewHandler.removeCallbacksAndMessages(null) } } @@ -276,8 +281,9 @@ class PhotoFragment : ViewPagerFragment() { } override fun onResourceReady(resource: Bitmap?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { - if (isFragmentVisible) - addZoomableView() + if (isFragmentVisible) { + scheduleZoomableView() + } return false } }).into(view.photo_view) @@ -302,46 +308,53 @@ class PhotoFragment : ViewPagerFragment() { } } - private fun addZoomableView() { - if (!context!!.config.replaceZoomableImages && medium.isImage() && isFragmentVisible && view.subsampling_view.isGone()) { - ViewPagerActivity.wasDecodedByGlide = false - view.subsampling_view.apply { - maxScale = 10f - beVisible() - isQuickScaleEnabled = context.config.oneFingerZoom - 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) - setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener { - override fun onImageLoaded() { - } - - override fun onReady() { - background = ColorDrawable(if (context.config.blackBackground) Color.BLACK else context.config.backgroundColor) - val useWidth = if (imageOrientation == ORIENTATION_ROTATE_90 || imageOrientation == ORIENTATION_ROTATE_270) sHeight else sWidth - val useHeight = if (imageOrientation == ORIENTATION_ROTATE_90 || imageOrientation == ORIENTATION_ROTATE_270) sWidth else sHeight - setDoubleTapZoomScale(getDoubleTapZoomScale(useWidth, useHeight)) - } - - override fun onTileLoadError(e: Exception?) { - } - - override fun onPreviewReleased() { - } - - override fun onImageLoadError(e: Exception) { - background = ColorDrawable(Color.TRANSPARENT) - beGone() - } - - override fun onPreviewLoadError(e: Exception?) { - background = ColorDrawable(Color.TRANSPARENT) - beGone() - } - }) + private fun scheduleZoomableView() { + loadZoomableViewHandler.removeCallbacksAndMessages(null) + loadZoomableViewHandler.postDelayed({ + if (isFragmentVisible && !context!!.config.replaceZoomableImages && medium.isImage() && view.subsampling_view.isGone()) { + addZoomableView() } + }, ZOOMABLE_VIEW_LOAD_DELAY) + } + + private fun addZoomableView() { + ViewPagerActivity.wasDecodedByGlide = false + view.subsampling_view.apply { + maxScale = 10f + beVisible() + isQuickScaleEnabled = context.config.oneFingerZoom + 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) + setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener { + override fun onImageLoaded() { + } + + override fun onReady() { + background = ColorDrawable(if (context.config.blackBackground) Color.BLACK else context.config.backgroundColor) + val useWidth = if (imageOrientation == ORIENTATION_ROTATE_90 || imageOrientation == ORIENTATION_ROTATE_270) sHeight else sWidth + val useHeight = if (imageOrientation == ORIENTATION_ROTATE_90 || imageOrientation == ORIENTATION_ROTATE_270) sWidth else sHeight + setDoubleTapZoomScale(getDoubleTapZoomScale(useWidth, useHeight)) + } + + override fun onTileLoadError(e: Exception?) { + } + + override fun onPreviewReleased() { + } + + override fun onImageLoadError(e: Exception) { + background = ColorDrawable(Color.TRANSPARENT) + beGone() + } + + override fun onPreviewLoadError(e: Exception?) { + background = ColorDrawable(Color.TRANSPARENT) + beGone() + } + }) } } @@ -349,7 +362,7 @@ class PhotoFragment : ViewPagerFragment() { isPanorama = try { val inputStream = if (medium.path.startsWith("content:/")) context!!.contentResolver.openInputStream(Uri.parse(medium.path)) else File(medium.path).inputStream() val imageParser = JpegImageParser().getXmpXml(ByteSourceInputStream(inputStream, medium.name), HashMap()) - imageParser.contains("GPano:UsePanoramaViewer=\"True\"", true) + imageParser.contains("GPano:UsePanoramaViewer=\"True\"", true) || imageParser.contains("True", true) } catch (e: Exception) { false } @@ -431,6 +444,7 @@ class PhotoFragment : ViewPagerFragment() { Glide.with(context!!).clear(view.photo_view) view.subsampling_view.recycle() } + loadZoomableViewHandler.removeCallbacksAndMessages(null) } override fun onConfigurationChanged(newConfig: Configuration) { 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 0f5ee02f6..27342d095 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -5,6 +5,7 @@ import android.content.res.Configuration import android.graphics.Point import android.graphics.SurfaceTexture import android.media.AudioManager +import android.media.MediaMetadataRetriever import android.net.Uri import android.os.Build import android.os.Bundle @@ -14,6 +15,7 @@ import android.view.* import android.view.animation.AnimationUtils import android.widget.SeekBar import android.widget.TextView +import com.bumptech.glide.Glide import com.google.android.exoplayer2.* import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory import com.google.android.exoplayer2.source.ExtractorMediaSource @@ -56,7 +58,8 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S private var mIsDragged = false private var mIsFullscreen = false private var mIsFragmentVisible = false - private var mWasInit = false + private var mWasFragmentInit = false + private var mIsExoPlayerInitialized = false private var mCurrTime = 0 private var mDuration = 0 @@ -94,7 +97,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S } checkFullscreen() - mWasInit = true + mWasFragmentInit = true mView!!.apply { brightnessSideScroll = video_brightness_controller @@ -109,76 +112,35 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S video_curr_time.setOnClickListener { skip(false) } video_duration.setOnClickListener { skip(true) } + Glide.with(context!!).load(medium.path).into(video_preview) } mExoPlayer = ExoPlayerFactory.newSimpleInstance(context, DefaultTrackSelector()) - mExoPlayer!!.addListener(object : Player.EventListener { - override fun onPlaybackParametersChanged(playbackParameters: PlaybackParameters?) {} + initExoPlayerListeners() - override fun onSeekProcessed() {} - - override fun onTracksChanged(trackGroups: TrackGroupArray?, trackSelections: TrackSelectionArray?) {} - - override fun onPlayerError(error: ExoPlaybackException?) { - activity?.showErrorToast(error.toString()) - } - - override fun onLoadingChanged(isLoading: Boolean) {} - - override fun onPositionDiscontinuity(reason: Int) {} - - override fun onRepeatModeChanged(repeatMode: Int) {} - - override fun onShuffleModeEnabledChanged(shuffleModeEnabled: Boolean) {} - - override fun onTimelineChanged(timeline: Timeline?, manifest: Any?, reason: Int) {} - - override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) { - when (playbackState) { - Player.STATE_READY -> videoPrepared() - Player.STATE_ENDED -> videoCompleted() - } - } - }) - - mExoPlayer!!.addVideoListener(object : VideoListener { - override fun onVideoSizeChanged(width: Int, height: Int, unappliedRotationDegrees: Int, pixelWidthHeightRatio: Float) { - mVideoSize.x = width - mVideoSize.y = height - setVideoSize() - } - - override fun onRenderedFirstFrame() {} - }) - - val isContentUri = medium.path.startsWith("content://") - val uri = if (isContentUri) Uri.parse(medium.path) else Uri.fromFile(File(medium.path)) - val dataSpec = DataSpec(uri) - val fileDataSource = if (isContentUri) ContentDataSource(context) else FileDataSource() - try { - fileDataSource.open(dataSpec) - } catch (e: Exception) { - activity?.showErrorToast(e) - } - - val factory = DataSource.Factory { fileDataSource } - val audioSource = ExtractorMediaSource(fileDataSource.uri, factory, DefaultExtractorsFactory(), null, null) - mExoPlayer!!.audioStreamType = AudioManager.STREAM_MUSIC - mExoPlayer!!.prepare(audioSource) medium.path.getVideoResolution()?.apply { mVideoSize.x = x mVideoSize.y = y setVideoSize() } + setupVideoDuration() + + mView!!.video_surface.onGlobalLayout { + if (mIsFragmentVisible && context?.config?.autoplayVideos == true) { + playVideo() + } + } + return mView } override fun onResume() { super.onResume() activity!!.updateTextColors(mView!!.video_holder) - val allowVideoGestures = context!!.config.allowVideoGestures - val allowInstantChange = context!!.config.allowInstantChange + val config = context!!.config + val allowVideoGestures = config.allowVideoGestures + val allowInstantChange = config.allowInstantChange mView!!.apply { video_volume_controller.beVisibleIf(allowVideoGestures) video_brightness_controller.beVisibleIf(allowVideoGestures) @@ -187,14 +149,15 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S instant_next_item.beVisibleIf(allowInstantChange) } - if (context!!.config.showExtendedDetails != mStoredShowExtendedDetails || context!!.config.extendedDetails != mStoredExtendedDetails) { + if (config.showExtendedDetails != mStoredShowExtendedDetails || config.extendedDetails != mStoredExtendedDetails) { checkExtendedDetails() } - if (context!!.config.bottomActions != mStoredBottomActions) { + if (config.bottomActions != mStoredBottomActions) { initTimeHolder() } + mView!!.video_time_holder.setBackgroundResource(if (config.bottomActions) 0 else R.drawable.gradient_background) storeStateVariables() } @@ -211,6 +174,25 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S } } + override fun setMenuVisibility(menuVisible: Boolean) { + super.setMenuVisibility(menuVisible) + if (mIsFragmentVisible && !menuVisible) { + pauseVideo() + } + + mIsFragmentVisible = menuVisible + if (mWasFragmentInit && menuVisible && context?.config?.autoplayVideos == true) { + playVideo() + } + } + + override fun onConfigurationChanged(newConfig: Configuration) { + super.onConfigurationChanged(newConfig) + setVideoSize() + initTimeHolder() + checkExtendedDetails() + } + private fun storeStateVariables() { context!!.config.apply { mStoredShowExtendedDetails = showExtendedDetails @@ -235,25 +217,63 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S checkExtendedDetails() } - override fun setMenuVisibility(menuVisible: Boolean) { - super.setMenuVisibility(menuVisible) - if (mIsFragmentVisible && !menuVisible) { - pauseVideo() + private fun initExoPlayer() { + val isContentUri = medium.path.startsWith("content://") + val uri = if (isContentUri) Uri.parse(medium.path) else Uri.fromFile(File(medium.path)) + val dataSpec = DataSpec(uri) + val fileDataSource = if (isContentUri) ContentDataSource(context) else FileDataSource() + try { + fileDataSource.open(dataSpec) + } catch (e: Exception) { + activity?.showErrorToast(e) } - mIsFragmentVisible = menuVisible - if (menuVisible && mWasInit) { - if (context?.config?.autoplayVideos == true) { - playVideo() - } - } + val factory = DataSource.Factory { fileDataSource } + val audioSource = ExtractorMediaSource(fileDataSource.uri, factory, DefaultExtractorsFactory(), null, null) + mExoPlayer!!.audioStreamType = AudioManager.STREAM_MUSIC + mExoPlayer!!.prepare(audioSource) } - override fun onConfigurationChanged(newConfig: Configuration) { - super.onConfigurationChanged(newConfig) - setVideoSize() - initTimeHolder() - checkExtendedDetails() + private fun initExoPlayerListeners() { + mExoPlayer!!.addListener(object : Player.EventListener { + override fun onPlaybackParametersChanged(playbackParameters: PlaybackParameters?) {} + + override fun onSeekProcessed() {} + + override fun onTracksChanged(trackGroups: TrackGroupArray?, trackSelections: TrackSelectionArray?) {} + + override fun onPlayerError(error: ExoPlaybackException?) { + mIsExoPlayerInitialized = false + } + + override fun onLoadingChanged(isLoading: Boolean) {} + + override fun onPositionDiscontinuity(reason: Int) {} + + override fun onRepeatModeChanged(repeatMode: Int) {} + + override fun onShuffleModeEnabledChanged(shuffleModeEnabled: Boolean) {} + + override fun onTimelineChanged(timeline: Timeline?, manifest: Any?, reason: Int) {} + + override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) { + mIsExoPlayerInitialized = playbackState == Player.STATE_READY || playbackState == Player.STATE_ENDED + when (playbackState) { + Player.STATE_READY -> videoPrepared() + Player.STATE_ENDED -> videoCompleted() + } + } + }) + + mExoPlayer!!.addVideoListener(object : VideoListener { + override fun onVideoSizeChanged(width: Int, height: Int, unappliedRotationDegrees: Int, pixelWidthHeightRatio: Float) { + mVideoSize.x = width + mVideoSize.y = height + setVideoSize() + } + + override fun onRenderedFirstFrame() {} + }) } private fun toggleFullscreen() { @@ -378,13 +398,18 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S return } + if (mView!!.video_preview.isVisible()) { + mView!!.video_preview.beGone() + initExoPlayer() + } + if (videoEnded()) { setProgress(0) } mIsPlaying = true mExoPlayer?.playWhenReady = true - mView!!.video_play_outline.setImageDrawable(resources.getDrawable(R.drawable.img_pause_outline_big)) + mView!!.video_play_outline.setImageResource(R.drawable.ic_pause) activity!!.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) mHidePauseHandler.postDelayed({ mView!!.video_play_outline.animate().alpha(0f).start() @@ -401,13 +426,12 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S mExoPlayer?.playWhenReady = false } - mView?.video_play_outline?.setImageDrawable(resources.getDrawable(R.drawable.img_play_outline_big)) - mView!!.video_play_outline.alpha = PLAY_PAUSE_VISIBLE_ALPHA - activity!!.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) - + mView?.video_play_outline?.setImageResource(R.drawable.ic_play) + mView?.video_play_outline?.alpha = PLAY_PAUSE_VISIBLE_ALPHA + activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) } - private fun videoEnded() = mExoPlayer!!.currentPosition >= mExoPlayer!!.duration + private fun videoEnded() = mExoPlayer?.currentPosition ?: 0 >= mExoPlayer?.duration ?: 0 private fun setProgress(seconds: Int) { mExoPlayer!!.seekTo(seconds * 1000L) @@ -415,6 +439,18 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S mCurrTimeView!!.text = seconds.getFormattedDuration() } + private fun setupVideoDuration() { + try { + val retriever = MediaMetadataRetriever() + retriever.setDataSource(medium.path) + mDuration = Math.round(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION).toInt() / 1000f) + } catch (ignored: Exception) { + } + + setupTimeHolder() + setProgress(0) + } + private fun videoPrepared() { if (mDuration == 0) { mDuration = (mExoPlayer!!.duration / 1000).toInt() @@ -454,15 +490,15 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S private fun releaseExoPlayer() { mExoPlayer?.stop() - mExoPlayer?.release() - mExoPlayer = null + Thread { + mExoPlayer?.release() + mExoPlayer = null + }.start() } - override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) { - } + override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {} - override fun onSurfaceTextureUpdated(surface: SurfaceTexture?) { - } + override fun onSurfaceTextureUpdated(surface: SurfaceTexture?) {} override fun onSurfaceTextureDestroyed(surface: SurfaceTexture?): Boolean { releaseExoPlayer() @@ -559,6 +595,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S } override fun onStopTrackingTouch(seekBar: SeekBar) { + if (mExoPlayer == null) + return + if (!mIsPlaying) { togglePlayPause() } else { 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 cf0b1aa63..ff80bbe58 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.helpers import android.content.Context import android.content.res.Configuration +import android.os.Environment import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.simplemobiletools.commons.helpers.BaseConfig @@ -367,6 +368,16 @@ class Config(context: Context) : BaseConfig(context) { // if a user hides a folder, then enables temporary hidden folder displaying, make sure we show it properly var everShownFolders: Set - get() = prefs.getStringSet(EVER_SHOWN_FOLDERS, HashSet()) + get() = prefs.getStringSet(EVER_SHOWN_FOLDERS, getEverShownFolders()) set(everShownFolders) = prefs.edit().putStringSet(EVER_SHOWN_FOLDERS, everShownFolders).apply() + + fun getEverShownFolders() = hashSetOf( + internalStoragePath, + Environment.DIRECTORY_DCIM, + Environment.DIRECTORY_PICTURES + ) + + var showRecycleBinAtFolders: Boolean + get() = prefs.getBoolean(SHOW_RECYCLE_BIN_AT_FOLDERS, true) + set(showRecycleBinAtFolders) = prefs.edit().putBoolean(SHOW_RECYCLE_BIN_AT_FOLDERS, showRecycleBinAtFolders).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 a33adcec3..0a74ddbd3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -58,6 +58,7 @@ const val WAS_RECYCLE_BIN_PINNED = "was_recycle_bin_pinned" const val USE_RECYCLE_BIN = "use_recycle_bin" const val GROUP_BY = "group_by" const val EVER_SHOWN_FOLDERS = "ever_shown_folders" +const val SHOW_RECYCLE_BIN_AT_FOLDERS = "show_recycle_bin_at_folders" // slideshow const val SLIDESHOW_INTERVAL = "slideshow_interval" @@ -144,5 +145,6 @@ const val BOTTOM_ACTION_SLIDESHOW = 128 const val BOTTOM_ACTION_SHOW_ON_MAP = 256 const val BOTTOM_ACTION_TOGGLE_VISIBILITY = 512 const val BOTTOM_ACTION_RENAME = 1024 +const val BOTTOM_ACTION_SET_AS = 2048 const val DEFAULT_BOTTOM_ACTIONS = BOTTOM_ACTION_TOGGLE_FAVORITE or BOTTOM_ACTION_EDIT or BOTTOM_ACTION_SHARE or BOTTOM_ACTION_DELETE diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/FilterThumbnailsManager.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/FilterThumbnailsManager.kt new file mode 100644 index 000000000..204f54f3b --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/FilterThumbnailsManager.kt @@ -0,0 +1,27 @@ +package com.simplemobiletools.gallery.helpers + +import android.graphics.Bitmap +import com.simplemobiletools.gallery.models.FilterItem +import java.util.* + +class FilterThumbnailsManager { + private var filterThumbnails = ArrayList(10) + private var processedThumbnails = ArrayList(10) + + fun addThumb(filterItem: FilterItem) { + filterThumbnails.add(filterItem) + } + + fun processThumbs(): ArrayList { + for (filterItem in filterThumbnails) { + filterItem.bitmap = filterItem.filter.processFilter(Bitmap.createBitmap(filterItem.bitmap)) + processedThumbnails.add(filterItem) + } + return processedThumbnails + } + + fun clearThumbs() { + filterThumbnails = ArrayList() + processedThumbnails = ArrayList() + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/FilterAdapterListener.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/FilterAdapterListener.kt new file mode 100644 index 000000000..3a5814721 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/FilterAdapterListener.kt @@ -0,0 +1,9 @@ +package com.simplemobiletools.gallery.interfaces + +import com.simplemobiletools.gallery.models.FilterItem + +interface FilterAdapterListener { + fun getCurrentFilter(): FilterItem + + fun setCurrentFilter(filterItem: FilterItem) +} diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt index 68e4c3642..7af0bd085 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/interfaces/MediumDao.kt @@ -40,4 +40,7 @@ interface MediumDao { @Query("DELETE FROM media WHERE deleted_ts != 0") fun clearRecycleBin() + + @Query("UPDATE media SET is_favorite = 0") + fun clearFavorites() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/models/FilterItem.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/models/FilterItem.kt new file mode 100644 index 000000000..f2dd7f2d6 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/models/FilterItem.kt @@ -0,0 +1,6 @@ +package com.simplemobiletools.gallery.models + +import android.graphics.Bitmap +import com.zomato.photofilters.imageprocessors.Filter + +data class FilterItem(var bitmap: Bitmap, val filter: Filter) diff --git a/app/src/main/res/drawable-hdpi/ic_aspect_ratio.png b/app/src/main/res/drawable-hdpi/ic_aspect_ratio.png new file mode 100644 index 000000000..81c7958d6 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_aspect_ratio.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_flip.png b/app/src/main/res/drawable-hdpi/ic_flip_horizontally.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_flip.png rename to app/src/main/res/drawable-hdpi/ic_flip_horizontally.png diff --git a/app/src/main/res/drawable-hdpi/ic_flip_vertically.png b/app/src/main/res/drawable-hdpi/ic_flip_vertically.png new file mode 100644 index 000000000..eff105482 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_flip_vertically.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_hide.png b/app/src/main/res/drawable-hdpi/ic_hide.png deleted file mode 100644 index b46cb212a..000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_panorama.png b/app/src/main/res/drawable-hdpi/ic_panorama.png index ab2b517b7..513420277 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_panorama.png and b/app/src/main/res/drawable-hdpi/ic_panorama.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_pause.png b/app/src/main/res/drawable-hdpi/ic_pause.png new file mode 100644 index 000000000..eeb009d81 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_pause.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_photo_filter.png b/app/src/main/res/drawable-hdpi/ic_photo_filter.png new file mode 100644 index 000000000..724d01d69 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_photo_filter.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_play.png b/app/src/main/res/drawable-hdpi/ic_play.png new file mode 100644 index 000000000..a2efea8dc Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_play.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_set_as.png b/app/src/main/res/drawable-hdpi/ic_set_as.png new file mode 100644 index 000000000..d4de4c2b5 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_set_as.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_unhide.png b/app/src/main/res/drawable-hdpi/ic_unhide.png deleted file mode 100644 index 4791d9f7d..000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_unhide.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/img_pause_outline_big.png b/app/src/main/res/drawable-hdpi/img_pause_outline_big.png deleted file mode 100644 index eda00d096..000000000 Binary files a/app/src/main/res/drawable-hdpi/img_pause_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/img_play_outline_big.png b/app/src/main/res/drawable-hdpi/img_play_outline_big.png deleted file mode 100644 index 67419faa2..000000000 Binary files a/app/src/main/res/drawable-hdpi/img_play_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_aspect_ratio.png b/app/src/main/res/drawable-xhdpi/ic_aspect_ratio.png new file mode 100644 index 000000000..8a69e996e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_aspect_ratio.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_flip.png b/app/src/main/res/drawable-xhdpi/ic_flip_horizontally.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_flip.png rename to app/src/main/res/drawable-xhdpi/ic_flip_horizontally.png diff --git a/app/src/main/res/drawable-xhdpi/ic_flip_vertically.png b/app/src/main/res/drawable-xhdpi/ic_flip_vertically.png new file mode 100644 index 000000000..4e9647fa9 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_flip_vertically.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_hide.png b/app/src/main/res/drawable-xhdpi/ic_hide.png deleted file mode 100644 index 62db27510..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_panorama.png b/app/src/main/res/drawable-xhdpi/ic_panorama.png index 8d1a82b24..c7f48d89c 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_panorama.png and b/app/src/main/res/drawable-xhdpi/ic_panorama.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_pause.png b/app/src/main/res/drawable-xhdpi/ic_pause.png new file mode 100644 index 000000000..7192ad487 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_pause.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_photo_filter.png b/app/src/main/res/drawable-xhdpi/ic_photo_filter.png new file mode 100644 index 000000000..05226c215 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_photo_filter.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_play.png b/app/src/main/res/drawable-xhdpi/ic_play.png new file mode 100644 index 000000000..bb5d7c623 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_play.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_set_as.png b/app/src/main/res/drawable-xhdpi/ic_set_as.png new file mode 100644 index 000000000..728313d9e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_set_as.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_unhide.png b/app/src/main/res/drawable-xhdpi/ic_unhide.png deleted file mode 100644 index 604bfd012..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_unhide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/img_pause_outline_big.png b/app/src/main/res/drawable-xhdpi/img_pause_outline_big.png deleted file mode 100644 index 0dccd18e2..000000000 Binary files a/app/src/main/res/drawable-xhdpi/img_pause_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/img_play_outline_big.png b/app/src/main/res/drawable-xhdpi/img_play_outline_big.png deleted file mode 100644 index e95083552..000000000 Binary files a/app/src/main/res/drawable-xhdpi/img_play_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_aspect_ratio.png b/app/src/main/res/drawable-xxhdpi/ic_aspect_ratio.png new file mode 100644 index 000000000..cc07c4c25 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_aspect_ratio.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_flip.png b/app/src/main/res/drawable-xxhdpi/ic_flip_horizontally.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_flip.png rename to app/src/main/res/drawable-xxhdpi/ic_flip_horizontally.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_flip_vertically.png b/app/src/main/res/drawable-xxhdpi/ic_flip_vertically.png new file mode 100644 index 000000000..45a93784f Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_flip_vertically.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_hide.png b/app/src/main/res/drawable-xxhdpi/ic_hide.png deleted file mode 100644 index 9ab0c3759..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_panorama.png b/app/src/main/res/drawable-xxhdpi/ic_panorama.png index 7dd982b25..17e7cde47 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_panorama.png and b/app/src/main/res/drawable-xxhdpi/ic_panorama.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_pause.png b/app/src/main/res/drawable-xxhdpi/ic_pause.png new file mode 100644 index 000000000..fb63ddc5a Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_pause.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_photo_filter.png b/app/src/main/res/drawable-xxhdpi/ic_photo_filter.png new file mode 100644 index 000000000..d555dd355 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_photo_filter.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_play.png b/app/src/main/res/drawable-xxhdpi/ic_play.png new file mode 100644 index 000000000..b568f7387 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_play.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_set_as.png b/app/src/main/res/drawable-xxhdpi/ic_set_as.png new file mode 100644 index 000000000..60f34eb20 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_set_as.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_unhide.png b/app/src/main/res/drawable-xxhdpi/ic_unhide.png deleted file mode 100644 index 196ab015f..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_unhide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/img_pause_outline_big.png b/app/src/main/res/drawable-xxhdpi/img_pause_outline_big.png deleted file mode 100644 index 4aa3cd3cc..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/img_pause_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/img_play_outline_big.png b/app/src/main/res/drawable-xxhdpi/img_play_outline_big.png deleted file mode 100644 index 8e32fbd54..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/img_play_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_aspect_ratio.png b/app/src/main/res/drawable-xxxhdpi/ic_aspect_ratio.png new file mode 100644 index 000000000..3c52ec564 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_aspect_ratio.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_flip.png b/app/src/main/res/drawable-xxxhdpi/ic_flip_horizontally.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_flip.png rename to app/src/main/res/drawable-xxxhdpi/ic_flip_horizontally.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_flip_vertically.png b/app/src/main/res/drawable-xxxhdpi/ic_flip_vertically.png new file mode 100644 index 000000000..0053524c4 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_flip_vertically.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_hide.png b/app/src/main/res/drawable-xxxhdpi/ic_hide.png deleted file mode 100644 index 3e7242a2e..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_panorama.png b/app/src/main/res/drawable-xxxhdpi/ic_panorama.png index bc6292769..deaad2e1c 100644 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_panorama.png and b/app/src/main/res/drawable-xxxhdpi/ic_panorama.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_pause.png b/app/src/main/res/drawable-xxxhdpi/ic_pause.png new file mode 100644 index 000000000..3ea7e03e5 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_pause.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_photo_filter.png b/app/src/main/res/drawable-xxxhdpi/ic_photo_filter.png new file mode 100644 index 000000000..f947149cb Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_photo_filter.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_play.png b/app/src/main/res/drawable-xxxhdpi/ic_play.png new file mode 100644 index 000000000..0bdaa8d04 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_play.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_set_as.png b/app/src/main/res/drawable-xxxhdpi/ic_set_as.png new file mode 100644 index 000000000..303e1780f Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_set_as.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_unhide.png b/app/src/main/res/drawable-xxxhdpi/ic_unhide.png deleted file mode 100644 index 8382da2ea..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_unhide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/img_pause_outline_big.png b/app/src/main/res/drawable-xxxhdpi/img_pause_outline_big.png deleted file mode 100644 index 57fb987a1..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/img_pause_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/img_play_outline_big.png b/app/src/main/res/drawable-xxxhdpi/img_play_outline_big.png deleted file mode 100644 index b8d6cff39..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/img_play_outline_big.png and /dev/null differ diff --git a/app/src/main/res/drawable/circle_black_background_with_inset.xml b/app/src/main/res/drawable/circle_black_background_with_inset.xml new file mode 100644 index 000000000..6bab48721 --- /dev/null +++ b/app/src/main/res/drawable/circle_black_background_with_inset.xml @@ -0,0 +1,7 @@ + + diff --git a/app/src/main/res/drawable/stroke_background.xml b/app/src/main/res/drawable/stroke_background.xml new file mode 100644 index 000000000..6d274b7d2 --- /dev/null +++ b/app/src/main/res/drawable/stroke_background.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/src/main/res/layout/activity_edit.xml b/app/src/main/res/layout/activity_edit.xml new file mode 100644 index 000000000..a6b77522b --- /dev/null +++ b/app/src/main/res/layout/activity_edit.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/view_crop_image.xml b/app/src/main/res/layout/activity_set_wallpaper.xml similarity index 100% rename from app/src/main/res/layout/view_crop_image.xml rename to app/src/main/res/layout/activity_set_wallpaper.xml diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index e9ef6cb2e..822fc4989 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -11,6 +11,28 @@ android:layout_height="wrap_content" android:orientation="vertical"> + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/bottom_actions_aspect_ratio.xml b/app/src/main/res/layout/bottom_actions_aspect_ratio.xml new file mode 100644 index 000000000..e2ccf6e00 --- /dev/null +++ b/app/src/main/res/layout/bottom_actions_aspect_ratio.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/layout/bottom_editor_actions_filter.xml b/app/src/main/res/layout/bottom_editor_actions_filter.xml new file mode 100644 index 000000000..734942343 --- /dev/null +++ b/app/src/main/res/layout/bottom_editor_actions_filter.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/app/src/main/res/layout/bottom_editor_crop_rotate_actions.xml b/app/src/main/res/layout/bottom_editor_crop_rotate_actions.xml new file mode 100644 index 000000000..da48247b9 --- /dev/null +++ b/app/src/main/res/layout/bottom_editor_crop_rotate_actions.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/bottom_editor_primary_actions.xml b/app/src/main/res/layout/bottom_editor_primary_actions.xml new file mode 100644 index 000000000..19ae4997a --- /dev/null +++ b/app/src/main/res/layout/bottom_editor_primary_actions.xml @@ -0,0 +1,37 @@ + + + + + + + + diff --git a/app/src/main/res/layout/dialog_manage_bottom_actions.xml b/app/src/main/res/layout/dialog_manage_bottom_actions.xml index 0e4bd1dcf..6e58322e4 100644 --- a/app/src/main/res/layout/dialog_manage_bottom_actions.xml +++ b/app/src/main/res/layout/dialog_manage_bottom_actions.xml @@ -102,5 +102,13 @@ android:paddingTop="@dimen/activity_margin" android:text="@string/rename"/> + + diff --git a/app/src/main/res/layout/editor_filter_item.xml b/app/src/main/res/layout/editor_filter_item.xml new file mode 100644 index 000000000..ff20581f1 --- /dev/null +++ b/app/src/main/res/layout/editor_filter_item.xml @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/app/src/main/res/layout/pager_photo_item.xml b/app/src/main/res/layout/pager_photo_item.xml index 3a9b587bc..8d35ed318 100644 --- a/app/src/main/res/layout/pager_photo_item.xml +++ b/app/src/main/res/layout/pager_photo_item.xml @@ -23,8 +23,8 @@ android:layout_width="@dimen/play_outline_size_big" android:layout_height="@dimen/play_outline_size_big" android:layout_centerInParent="true" - android:background="@android:color/transparent" - android:padding="@dimen/big_margin" + android:background="@drawable/circle_black_background_with_inset" + android:padding="28dp" android:src="@drawable/ic_panorama" android:visibility="gone"/> diff --git a/app/src/main/res/layout/pager_video_item.xml b/app/src/main/res/layout/pager_video_item.xml index 03014aa82..435f4ce1a 100644 --- a/app/src/main/res/layout/pager_video_item.xml +++ b/app/src/main/res/layout/pager_video_item.xml @@ -6,6 +6,11 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + + android:background="@drawable/circle_black_background_with_inset" + android:padding="26dp" + android:src="@drawable/ic_play"/> + android:layout_alignParentBottom="true"> - - - - - - - - + app:showAsAction="ifRoom"/> diff --git a/app/src/main/res/menu/menu_viewpager.xml b/app/src/main/res/menu/menu_viewpager.xml index 85cd15500..282910e8a 100644 --- a/app/src/main/res/menu/menu_viewpager.xml +++ b/app/src/main/res/menu/menu_viewpager.xml @@ -73,10 +73,6 @@ android:id="@+id/menu_move_to" android:title="@string/move_to" app:showAsAction="never"/> - + + app:showAsAction="ifRoom"/> قلب أفقيا قلب عموديا تعديل باستخدام + Free خلفية بسيطة تعيين كخلفية الشاشة فشل الإعداد كخلفية تعيين كخلفية بواسطة: - ... جار تعيين الخلفية ... + … جار تعيين الخلفية ... تم تعيبن الخلفية بنجاح صورة نسبة العرض إلى الارتفاع نسبة العرض إلى الارتفاع في المناظر الطبيعية @@ -157,6 +158,7 @@ إخفاء التفاصيل الموسعة عند إخفاء شريط الحالة قم بإجراء فحص إضافي لتجنب إظهار الملفات التالفة Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen المصغرات diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index b3a3e2ca0..4bc9dd3ae 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -24,17 +24,17 @@ Brillantor Bloquejar orientació Desbloquejar orientació - Change orientation - Force portrait - Force landscape - Use default orientation + Canviar orientació + Forçar vertical + Forçar horitzontal + Fer servir la orientació per defecte Filtre d\'arxius Imatges Vídeos GIFs - RAW images + Imatges RAW No s\'han tronat arxius amb els filtres seleccionats. Canviar filtres @@ -84,6 +84,7 @@ Horizontalment Verticalment Editar amb + Lliure Fons de pantalla de Simple Gallery @@ -152,18 +153,19 @@ Substituïr imatges ampliades per les de millor quialitat Amaga els detalls estesos quan la barra d\'estat està amagada Fer una verificació addicional per evitar que es mostrin fitxers no vàlids - Show some action buttons at the bottom of the screen + Mostra alguns botons d\'acció a la part inferior de la pantalla + Mostra la paperera de reciclatge a la pantalla de carpetes Miniatures Mitjans a pantalla completa Detalls estesos - Bottom actions + Accions de la part inferior - Manage visible bottom actions - Toggle favorite - Toggle file visibility + Administra les accions de la part inferior + Activa favorits + Activa la visibilitat del fitxer Com puc fer que Simple Gallery sigui la galeria de dispositius predeterminada? @@ -188,8 +190,8 @@ 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. Puc retallar imatges amb aquesta aplicació? Sí, pots retallar imatges a l\'editor, arrossegant les cantonades de la imatge. Pots accedir a l\'editor prement una miniatura d\'imatge i seleccionant Edita o seleccionant Edita des de la visualització de pantalla completa. - Can I somehow group media file thumbnails? - Sure, just use the \"Group by\" menu item while at the thumbnails view. You can group files by multiple criteria, including Date Taken. If you use the \"Show all folders content\" function you can group them by folders too. + Puc agrupar d\'alguna manera les miniatures del fitxer multimèdia? + Si, només heu d\'utilitzar l\'ítem del menú \"Agrupar per\" mentre es troba a la vista en miniatura. Podeu agrupar fitxers amb diversos criteris, inclòs data de presa. Si utilitzeu la funció \"Mostra el contingut de totes les carpetes\", també podeu agrupar-les per carpetes. diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index af08849c9..f6d433af3 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -84,6 +84,7 @@ Překlopit vodorovně Překlopit svisle Edit with + Free Jednoduchá tapeta @@ -153,6 +154,7 @@ Hide extended details when status bar is hidden Do an extra check to avoid showing invalid files Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Thumbnails diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 08e7235f5..0615f60e3 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -84,6 +84,7 @@ Spejlvend vandret Spejlvend lodret Rediger med + Free Simple Wallpaper @@ -153,6 +154,7 @@ Skjul udvidede oplysninger når statuslinjen er skjult Tjek en ekstra gang for at undgå visning af ugyldige filer Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Thumbnails diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 449f6819f..04c5d88e5 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -25,9 +25,9 @@ Bildschirmausrichtung sperren Bildschirmausrichtung entsperren Change orientation - Force portrait - Force landscape - Use default orientation + Hochkant erzwingen + Breitbild erzwingen + Standard Ausrichtung benutzen Filter @@ -84,6 +84,7 @@ Horizontal spiegeln Vertikal spiegeln Bearbeiten mit + Free Schlichter Hintergrund @@ -153,6 +154,7 @@ Erweiterte Details nicht anzeigen, wenn die Systemleiste versteckt ist Zusätzliche Überprüfung, um ungültige Dateien nicht anzuzeigen Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Thumbnails diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index b09ca6de0..43e7d8ef8 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -84,6 +84,7 @@ Οριζόντιο αναποδογύρισμα Κατακόρυφο αναποδογύρισμα Επεξεργασία με + Free Simple Wallpaper @@ -154,6 +155,7 @@ Απόκρυψη λεπτομερειών όταν η μπάρα κατάστασης είναι κρυμμένη Επιπλέον έλεγχος για την αποφυγή εμφάνισης λανθασμένων αρχείων Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Εικονίδια diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 68e2a14d3..31f612e1f 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -24,17 +24,17 @@ Brillo Bloquear orientación Desbloquear orientación - Change orientation - Force portrait - Force landscape - Use default orientation + Cambiar orientación + Forzar retrato + Forzar paisaje + Usar la orientación por defecto Filtro de medios Imágenes Vídeos GIFs - RAW images + Imagenes RAW No se han encontrado ficheros con los filtros seleccionados. Cambiar filtros @@ -84,6 +84,7 @@ Horizontalmente Verticalmente Editar con + Libre Fondos de pantalla Simple Gallery @@ -152,18 +153,19 @@ Reemplace las imágenes con mucho zoom por otras de mejor calidad Ocultar detalles ampliados cuando la barra de estado está oculta Hacer una comprobación adicional para evitar mostrar archivos inválidos - Show some action buttons at the bottom of the screen + Mostrar algunos botones de acción en la parte inferior de la pantalla + Muestra la papelera de reciclaje en la pantalla de carpetas Miniaturas Medios a pantalla compelta Detalles ampliados - Bottom actions + Acciones en la parte inferior - Manage visible bottom actions - Toggle favorite - Toggle file visibility + Administrar los botones de la parte inferior + Activar favoritos + Activar visibilidad de fichero ¿Cómo puedo hacer que Simple Gallery sea la galería de dispositivos predeterminada? @@ -188,8 +190,8 @@ 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. ¿Puedo recortar imágenes con esta aplicación? Sí, puede recortar imágenes en el editor arrastrando las esquinas de la imagen. Puede acceder al editor pulsando prolongadamente una imagen en miniatura y seleccionando Editar, o seleccionando Editar en la vista de pantalla completa. - Can I somehow group media file thumbnails? - Sure, just use the \"Group by\" menu item while at the thumbnails view. You can group files by multiple criteria, including Date Taken. If you use the \"Show all folders content\" function you can group them by folders too. + ¿Puedo de alguna manera agrupar miniaturas de archivos multimedia? + Claro, solo use el elemento de menú \"Agrupar por \" mientras esté en la vista de miniaturas. Puede agrupar archivos según varios criterios, incluida la Fecha de toma. Si usa la función \"Mostrar todo el contenido de las carpetas\" también puede agruparlas por carpetas. diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 468837a8f..b9c3fd0ce 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -84,6 +84,7 @@ Pyöräytä vaakasuoraan Pyöräytä pystysuoraan Muokkaa sovelluksella + Free Simple Wallpaper @@ -153,6 +154,7 @@ Piilota yksityiskohtaiset tiedot kun tilapalkki on piilotettu Tee ylimääräinen tarkistus rikkinäisten tiedostojen varalta Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Esikatselukuvat diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 20d618b80..f846d815c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -84,6 +84,7 @@ Retourner horizontalement Retourner verticalement Éditer avec + Free Simple fond d\'écran @@ -153,6 +154,7 @@ Masquer les détails supplémentaires lorsque la barre d\'état est masquée Faire une vérification supplémentaire pour éviter de montrer des fichiers invalides Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Vignettes diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index bbb7d82f0..fb3ea2570 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -84,6 +84,7 @@ Voltear horizontalmente Voltear verticalmente Editar con + Free Fondo de pantalla @@ -153,6 +154,7 @@ Agochar detalles extendidos cando a barra de estado está oculta Facer unha comprobación extra para evitar mostrar ficheiros non válidos Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Iconas diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 42ee13699..922a3ce86 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -84,6 +84,7 @@ Okreni horizontalno Okreni vertikalno Uredi pomoću + Free Jednostavna pozadina @@ -153,6 +154,7 @@ Sakrij proširene pojedinosti kada je traka statusa skrivena Napravite dodatnu provjeru da biste izbjegli prikazivanje nevažećih datoteka Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Sličice diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index a4e6f657e..fb4eb29db 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -84,6 +84,7 @@ Flip horizontally Flip vertically Edit with + Free Simple Wallpaper @@ -153,6 +154,7 @@ Hide extended details when status bar is hidden Do an extra check to avoid showing invalid files Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Thumbnails diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 8a0ed22f9..df170a074 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -27,7 +27,7 @@ Cambia orientamento Forza verticale Forza orizzontale - Usa l'orientamento predefinito + Usa l\'orientamento predefinito Filtra i media @@ -84,6 +84,7 @@ Capovolgi orizzontalmente Capovolgi verticalmente Modifica con + Free Sfondo semplice @@ -153,6 +154,7 @@ Nascondi i dettagli estesi quando la barra di stato è nascosta Fai un controllo ulteriore per evitare di mostrare file non validi Mostra alcuni pulsanti azione in fondo allo schermo + Show the Recycle Bin at the folders screen Miniature diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 682cc47fa..a9b209b0d 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -1,19 +1,19 @@ - + シンプル ギャラリー ギャラリー 編集 カメラを開く (非表示) - (excluded) + (除外) フォルダをピン留めする フォルダのピン留めを外す トップにピン留めする - 全てを表示 + すべてを表示 すべてのフォルダ フォルダを選択する その他のフォルダ - 地図で表示 + 地図上で表示 位置情報がありません 列数を増やす 列数を減らす @@ -23,40 +23,40 @@ 音量 明るさ 画面の向きを固定する - 向きの固定を解除する - Change orientation - Force portrait - Force landscape - Use default orientation + 固定を解除する + 向きを固定する + 縦で固定 + 横で固定 + デフォルト仕様 - 表示するメディアの種類 + 表示する形式 画像 ビデオ GIF - RAW images - 絞り込み条件に該当するメディアがありません。 + RAW + 条件に該当するメディアがありません。 絞り込み条件を変更 - 対象のフォルダに「.nomedia」というファイルを作成し、フォルダを非表示にします。そのフォルダ以下のすべてのサブフォルダも、同様に非表示となります。非表示となったフォルダを見るには、「設定」の中にある「非表示のフォルダを表示」オプションを切り替えてください。このフォルダを非表示にしますか? + 対象のフォルダに「.nomedia」ファイルを作成し、フォルダを非表示にします。そのフォルダの中にあるすべてのサブフォルダも非表示となります。非表示のフォルダを見るには、「設定」の中にある「非表示のフォルダを表示」で切り替えてください。このフォルダを非表示にしますか? 除外する 除外フォルダ - 除外フォルダを管理 - 選択したフォルダとそのサブフォルダを、Simple Galleyの一覧から除外します。除外したフォルダは「設定」で管理できます。 + 除外フォルダの管理 + 選択したフォルダとそのサブフォルダを、Simple Galleyの一覧から除外します。除外したフォルダは「設定」で確認できます。 親フォルダを選択して除外することもできます。 フォルダを除外すると、サブフォルダも含めSimple Galleyの一覧から除外します。他のアプリでは引き続き表示されます。\\n\\n他のアプリでも非表示にしたい場合は、「非表示」機能を使用してください。 すべて解除 除外するフォルダの登録をすべて解除しますか? フォルダ自体は削除されません。 非表示フォルダ - 非表示フォルダを管理する - \".nomedia\"ファイルで隠されたフォルダはありません。 + 非表示フォルダの管理 + \".nomedia\"で隠されたフォルダはありません。 追加フォルダ - 追加フォルダを管理 + 追加フォルダの管理 フォルダを追加 - メディアを含んでいるフォルダがアプリから認識されていない場合は、手動で追加できます。 + メディア入りのフォルダがアプリで認識されない場合は手動で追加します。 リサイズ @@ -67,7 +67,7 @@ 解像度を正しく入力してください - エディター + 画像編集 保存 回転 パス @@ -79,11 +79,12 @@ 元のファイルを上書きできません 左に回転 右に回転 - 180º回転 + 180o回転 反転 水平方向に反転 垂直方向に反転 他のアプリで編集 + Free シンプル壁紙 @@ -115,55 +116,56 @@ 表示形式の変更 グリッド リスト - Group direct subfolders + サブフォルダでグループ化 - Group by - Do not group files - Folder - Last modified - Date taken - File type - Extension + グループ分け + 何もしない + フォルダ + 更新日時 + 撮影日時 + ファイル形式 + 拡張子 ビデオを自動再生する ファイル名の表示を切り替え - ビデオをリピート再生する - GIF画像のサムネイルをアニメーション表示する + ビデオを繰り返し再生する + アニメーションGIFのサムネイルを動かす メディア再生時に明るさを最大にする サムネイルを正方形に切り取る メディア再生時のフルスクリーン表示切り替え システム設定に従う 端末の向きに従う メディアの縦横比に従う - フルスクリーン表示の背景色とステータスバーの背景色を黒にする + 表示の背景色とステータスバーの背景色を黒にする サムネイル画面を横方向にスクロール フルスクリーン時にシステムUIを非表示にする - メディアの削除後にフォルダが空になった場合、そのフォルダを削除する - 垂直のジェスチャーで写真の明るさを制御できるようにする - ビデオ再生中に、音量と明るさを縦方向のジェスチャーで変更する - フォルダの中にあるメディアの数をメイン画面に表示する - フルスクリーンメニューの「共有」を「回転」に置き換える - フルスクリーン画面に詳細を重ねて表示する + フォルダが空になったらフォルダも削除する + 垂直のジェスチャーで写真の明るさを制御する + 音量と明るさを縦のジェスチャーで変更する + フォルダ内のメディアの数を表示する + フルスクリーン時の「共有」を「回転」に置き換える + フルスクリーンに詳細を重ねて表示する 詳細表示を管理する - フルスクリーン表示のメディアを指ひとつでズームできるようにする - 画面の端を押してメディアをすぐに変更できるようにする - ズーム可能な画像をより高画質なものに置き換える - ステータスバーが非表示の時は詳細を表示しない - 無効なファイルを表示しないための調査を行います - Show some action buttons at the bottom of the screen + メディアを指ひとつでズーム可能にする + 画面の端を押してメディアをスライドする + ズームが可能な画像を高画質な物にする + ステータスバーが非表示の時は詳細を隠す + 無効なファイルを見せない調整を行う + 画面下部にアクションボタンを表示する + フォルダ画面にごみ箱を表示する - サムネイル - メディアのみ + サムネイル設定 + メディア設定 詳細も表示する - Bottom actions + 画面下部のアクション - Manage visible bottom actions - Toggle favorite - Toggle file visibility + 表示するアクションの選択 + お気に入り + 表示/非表示の切替 How can I make Simple Gallery the default device gallery? @@ -173,8 +175,8 @@ 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? diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index bb8b91f2f..9d4cc89fe 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -84,6 +84,7 @@ 가로 반전 세로 반전 이미지편집 프로그램 연결 + Free Simple Wallpaper @@ -153,6 +154,7 @@ 상태 표시 줄이 숨겨져있을 때 확장 된 세부 정보 숨김 잘못된 파일 표시를 방지하기 위해 추가 검사 수행 Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen 섬네일 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 9cf84aecb..44d6f6ac0 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -84,6 +84,7 @@ Apversti horizontaliai Apversti vertikaliai Redaguoti su + Free Paprastas darbalaukio fonas @@ -153,6 +154,7 @@ Slėpti išsamią informaciją, kai būsenos juosta yra paslėpta Atlikti papildomą patikrinimą, kad nebūtų rodomos sugadintos bylos Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Miniatiūros diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index a2b6161b8..2d21ba305 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -84,6 +84,7 @@ Speilvend horisontalt Speilvend vertikalt Rediger med + Free Bakgrunnsbilde @@ -153,6 +154,7 @@ Skjul utvidede detaljer når statuslinjen er skjult Gjør en ekstra sjekk for å unngå visning av ugyldige filer Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Minibilder diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 8a209901b..cad80158a 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -84,6 +84,7 @@ Horizontaal kantelen Verticaal kantelen Bewerken met + Vrij Achtergrond @@ -153,6 +154,7 @@ Uitgebreide informatie niet tonen als de statusbalk is verborgen Ongeldige bestanden verbergen Enkele actieknoppen onderaan het scherm tonen + Prullenbak weergeven in de mapweergave Miniatuurvoorbeelden diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 12ef62006..ed6d9d6d9 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -1,6 +1,6 @@ - Prosta Galeria + Prosta galeria    Galeria Edytuj Uruchom aplikację aparatu @@ -24,10 +24,10 @@ Jasność Zablokuj orientację ekranu Odblokuj orientację ekranu - Change orientation - Force portrait - Force landscape - Use default orientation + Zmień orientację ekranu + Wymuś pionową + Wymuś poziomą + Używaj systemowej Filtruj multimedia @@ -84,6 +84,7 @@ Przewróć w poziomie Przewróć w pionie Edytuj w: + Wolne Tapeta @@ -153,17 +154,18 @@    Ukrywaj dodatkowe szczegóły gdy pasek stanu jest ukryty    Dodatkowe sprawdzenie w celu uniknięcia pokazywania niewłaściwych plików Pokazuj niektóre przyciski akcji na dole ekranu + Pokazuj kosz w widoku folderów    Miniatury    Widok pełnoekranowy    Dodatkowe szczegóły - Bottom actions + Przyciski na dolnym pasku - Manage visible bottom actions - Toggle favorite - Toggle file visibility + Zarządzaj przyciskami na dolnym pasku + Ulubione + Widoczność plików    Jak mogę ustawić tą aplikację jako domyślną aplikację galerii? @@ -174,7 +176,7 @@    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? +    Jaka jest różnica mię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? Aplikacja niestety nie wie, czy dane zdjęcie jest okładką od piosenki czy czymś innym. Aby ukryć niechciane rzeczy, przytrzymaj je i wybierz opcję \'Wyklucz\' z paska akcji. diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 423b02944..fee389a29 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -84,6 +84,7 @@ Horizontalmente Verticalmente Editar com + Free Simple Wallpaper @@ -153,6 +154,7 @@ Ocultar detalhes extendidos quando a barra de status estiver oculta Realizar verificação extra para evitar mostrar arquivos inválidos Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Miniaturas diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 5d1f9047e..539afb935 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -84,6 +84,7 @@ Horizontalmente Verticalmente Editar com + Free Simple Wallpaper @@ -153,6 +154,7 @@ Ocultar detalhes extra se a barra de estado estiver oculta Efetuar uma dupla verificação para evitar mostrar os ficheiros inválidos Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Miniaturas diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2c44256e2..015011c1e 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -84,6 +84,7 @@ По горизонтали По вертикали Редактировать в… + Free Простые обои @@ -153,6 +154,7 @@ Не показывать подробности при скрытой строке состояния Делать дополнительную проверку, чтобы избежать показа неподдерживаемых файлов Показывать кнопки действий в нижней части экрана + Show the Recycle Bin at the folders screen Миниатюры diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index f286ca9cd..8a599c80a 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -84,6 +84,7 @@ Preklopiť vodorovne Preklopiť zvisle Upraviť s + Voľný Jednoduchá tapeta @@ -153,6 +154,7 @@ Skryť rozšírené vlastnosti ak je skrytá stavová lišta Predísť zobrazovaniu neplatných súborov dodatočnou kontrolou Zobraziť niektoré akčné tlačidlá na spodku obrazovky + Zobraziť odpadkový kôš na obrazovke s priečinkami Náhľady diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 40467de14..47c17d58e 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -84,6 +84,7 @@ Vänd horisontellt Vänd vertikalt Redigera med + Free Bakgrund @@ -153,6 +154,7 @@ 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 Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Miniatyrer diff --git a/app/src/main/res/values-sw600dp/dimens.xml b/app/src/main/res/values-sw600dp/dimens.xml index 051c76507..54e50f08a 100644 --- a/app/src/main/res/values-sw600dp/dimens.xml +++ b/app/src/main/res/values-sw600dp/dimens.xml @@ -4,6 +4,5 @@ 120dp 30dp 38dp - 200dp 60dp diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 8b852948b..ea4a9b010 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -84,6 +84,7 @@ Yatay Dikey Edit with + Free Basit Duvar Kağıdı @@ -153,6 +154,7 @@ Hide extended details when status bar is hidden Do an extra check to avoid showing invalid files Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Thumbnails diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 5ba841b11..fcc89dda8 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -84,6 +84,7 @@ 水平翻转 垂直翻转 编辑方式 + Free 简约壁纸 @@ -153,6 +154,7 @@ 当状态栏隐藏时隐藏扩展详情 额外检查以避免显示无效的文件 在屏幕底部显示一些操作按钮 + Show the Recycle Bin at the folders screen 缩略图 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 6270468b8..f46e200a7 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -84,6 +84,7 @@ 水平翻轉 垂直翻轉 用其他程式編輯 + Free 簡易桌布 @@ -153,6 +154,7 @@ 狀態欄隱藏時,同時隱藏詳細資訊 進行額外檢查,避免顯示無效的檔案 在螢幕底部顯示一些操作按鈕 + Show the Recycle Bin at the folders screen 縮圖 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 78adecbeb..14367ad1f 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -5,10 +5,12 @@ 20dp 22dp 26dp - 130dp + 96dp 60dp 60dp 30dp 72dp - 60dp + 64dp + 76dp + 90dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 970180e22..6ea4fa6b4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -84,6 +84,7 @@ Flip horizontally Flip vertically Edit with + Free Simple Wallpaper @@ -153,6 +154,7 @@ Hide extended details when status bar is hidden Do an extra check to avoid showing invalid files Show some action buttons at the bottom of the screen + Show the Recycle Bin at the folders screen Thumbnails diff --git a/build.gradle b/build.gradle index ce1386288..82672aab8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.50' + ext.kotlin_version = '1.2.51' repositories { jcenter()