Merge pull request #40 from SimpleMobileTools/master

upd
This commit is contained in:
solokot 2018-11-05 15:12:37 +03:00 committed by GitHub
commit 2d5a7db496
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 1821 additions and 946 deletions

4
.gitignore vendored
View file

@ -1,9 +1,11 @@
*.iml *.iml
*.aab
.gradle .gradle
/local.properties /local.properties
/gradle.properties
/.idea/ /.idea/
.DS_Store .DS_Store
/build /build
/captures /captures
release.keystore keystore.jks
signing.properties signing.properties

View file

@ -1,6 +1,34 @@
Changelog Changelog
========== ==========
Version 6.0.0 *(2018-11-04)*
----------------------------
* Initial Pro version
Version 5.1.3 *(2018-11-04)*
----------------------------
* Adding an option to store last video playback position (by mathevs)
* Adding a "Keep both" conflict resolution at copy/move (by Doubl3MM)
* Improved panoramic video detection
* Remove some glitches related to third party file opening
* Do not exclude the Data folder by default
* Removed the "Avoid showing Whats New at app startup" option
* This version of the app is no longer maintained. Please upgrade to the Pro version. It is free till Nov 12 2018. You can find the Upgrade button at the top of the app Settings.
Version 5.1.2 *(2018-10-30)*
----------------------------
* Added a new option for password protecting file deletion/move
* Improved panorama video detection
* Improved the opening of media files without file extension
* Disabled move operation on Recycle bin items, use Restore
* Fixed handling of some third party image picker intents
* Fixed slideshow looping and a couple other UX glitches
* Improved the stability of retrieving cached files
* Hi
Version 5.1.1 *(2018-10-23)* Version 5.1.1 *(2018-10-23)*
---------------------------- ----------------------------

View file

@ -4,15 +4,33 @@
A gallery for viewing photos and videos. A gallery for viewing photos and videos.
A simple tool usable for viewing photos and videos. Items can be sorted by date, size, name both ascending or descending, photos can be zoomed in. Media files are shown in multiple columns depending on the size of the display, you can change the column count by pinch gestures. They can be renamed, shared, deleted, copied, moved. Images can also be cropped, rotated, flipped or set as Wallpaper directly from the app. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
The Gallery is also offered for third party usage for previewing images / videos, adding attachments at email clients etc. It's perfect for everyday usage. It is open source, contains no ads or unnecessary permissions.
Contains no ads or unnecessary permissions. It is fully opensource, provides customizable colors. Let's list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
This app is just one piece of a bigger series of apps. You can find the rest of them at http://www.simplemobiletools.com The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
<a href='https://play.google.com/store/apps/details?id=com.simplemobiletools.gallery'><img src='http://simplemobiletools.github.io/assets/public/google-play.png' alt='Get it on Google Play' height='45' /></a> This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
<a href='https://play.google.com/store/apps/details?id=com.simplemobiletools.gallery.pro'><img src='http://simplemobiletools.github.io/assets/public/google-play.png' alt='Get it on Google Play' height='45' /></a>
<a href='https://f-droid.org/packages/com.simplemobiletools.gallery'><img src='http://simplemobiletools.github.io/assets/public/f-droid.png' alt='Get it on F-Droid' height='45' /></a> <a href='https://f-droid.org/packages/com.simplemobiletools.gallery'><img src='http://simplemobiletools.github.io/assets/public/f-droid.png' alt='Get it on F-Droid' height='45' /></a>
<div style="display:flex;"> <div style="display:flex;">

View file

@ -8,11 +8,11 @@ android {
buildToolsVersion "28.0.3" buildToolsVersion "28.0.3"
defaultConfig { defaultConfig {
applicationId "com.simplemobiletools.gallery" applicationId "com.simplemobiletools.gallery.pro"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 205 versionCode 208
versionName "5.1.1" versionName "6.0.0"
multiDexEnabled true multiDexEnabled true
setProperty("archivesBaseName", "gallery") setProperty("archivesBaseName", "gallery")
} }
@ -48,7 +48,7 @@ android {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:5.2.8' implementation 'com.simplemobiletools:commons:5.3.9'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'androidx.multidex:multidex:2.0.0' implementation 'androidx.multidex:multidex:2.0.0'
implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1'

View file

@ -2,7 +2,7 @@
<manifest <manifest
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.simplemobiletools.gallery" package="com.simplemobiletools.gallery.pro"
android:installLocation="auto"> android:installLocation="auto">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

View file

@ -1,3 +0,0 @@
package com.simplemobiletools.gallery.models
open class ThumbnailItem

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery package com.simplemobiletools.gallery.pro
import androidx.multidex.MultiDexApplication import androidx.multidex.MultiDexApplication
import com.github.ajalt.reprint.core.Reprint import com.github.ajalt.reprint.core.Reprint

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
@ -9,10 +9,10 @@ import android.graphics.Point
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.provider.MediaStore import android.provider.MediaStore
import androidx.recyclerview.widget.LinearLayoutManager
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.widget.RelativeLayout import android.widget.RelativeLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.engine.DiskCacheStrategy
@ -25,14 +25,14 @@ import com.simplemobiletools.commons.helpers.OTG_PATH
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.FiltersAdapter import com.simplemobiletools.gallery.pro.adapters.FiltersAdapter
import com.simplemobiletools.gallery.dialogs.ResizeDialog import com.simplemobiletools.gallery.pro.dialogs.ResizeDialog
import com.simplemobiletools.gallery.dialogs.SaveAsDialog import com.simplemobiletools.gallery.pro.dialogs.SaveAsDialog
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.extensions.openEditor import com.simplemobiletools.gallery.pro.extensions.openEditor
import com.simplemobiletools.gallery.helpers.FilterThumbnailsManager import com.simplemobiletools.gallery.pro.helpers.FilterThumbnailsManager
import com.simplemobiletools.gallery.models.FilterItem import com.simplemobiletools.gallery.pro.models.FilterItem
import com.theartofdev.edmodo.cropper.CropImageView import com.theartofdev.edmodo.cropper.CropImageView
import com.zomato.photofilters.FilterPack import com.zomato.photofilters.FilterPack
import com.zomato.photofilters.imageprocessors.Filter import com.zomato.photofilters.imageprocessors.Filter

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
@ -6,9 +6,9 @@ import android.view.MenuItem
import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.ManageFoldersAdapter import com.simplemobiletools.gallery.pro.adapters.ManageFoldersAdapter
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import kotlinx.android.synthetic.main.activity_manage_folders.* import kotlinx.android.synthetic.main.activity_manage_folders.*
class ExcludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { class ExcludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
@ -6,11 +6,11 @@ import android.view.MenuItem
import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.ManageHiddenFoldersAdapter import com.simplemobiletools.gallery.pro.adapters.ManageHiddenFoldersAdapter
import com.simplemobiletools.gallery.extensions.addNoMedia import com.simplemobiletools.gallery.pro.extensions.addNoMedia
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.extensions.getNoMediaFolders import com.simplemobiletools.gallery.pro.extensions.getNoMediaFolders
import kotlinx.android.synthetic.main.activity_manage_folders.* import kotlinx.android.synthetic.main.activity_manage_folders.*
class HiddenFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { class HiddenFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
@ -7,9 +7,9 @@ import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.scanPathRecursively import com.simplemobiletools.commons.extensions.scanPathRecursively
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.ManageFoldersAdapter import com.simplemobiletools.gallery.pro.adapters.ManageFoldersAdapter
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import kotlinx.android.synthetic.main.activity_manage_folders.* import kotlinx.android.synthetic.main.activity_manage_folders.*
class IncludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { class IncludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.app.Activity import android.app.Activity
import android.app.SearchManager import android.app.SearchManager
@ -27,20 +27,20 @@ import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.commons.models.Release import com.simplemobiletools.commons.models.Release
import com.simplemobiletools.commons.views.MyGridLayoutManager import com.simplemobiletools.commons.views.MyGridLayoutManager
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.gallery.BuildConfig import com.simplemobiletools.gallery.pro.BuildConfig
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.DirectoryAdapter import com.simplemobiletools.gallery.pro.adapters.DirectoryAdapter
import com.simplemobiletools.gallery.databases.GalleryDatabase import com.simplemobiletools.gallery.pro.databases.GalleryDatabase
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog import com.simplemobiletools.gallery.pro.dialogs.ChangeSortingDialog
import com.simplemobiletools.gallery.dialogs.FilterMediaDialog import com.simplemobiletools.gallery.pro.dialogs.FilterMediaDialog
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.interfaces.DirectoryDao import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
import com.simplemobiletools.gallery.interfaces.DirectoryOperationsListener import com.simplemobiletools.gallery.pro.interfaces.DirectoryOperationsListener
import com.simplemobiletools.gallery.interfaces.MediumDao import com.simplemobiletools.gallery.pro.interfaces.MediumDao
import com.simplemobiletools.gallery.models.AlbumCover import com.simplemobiletools.gallery.pro.models.AlbumCover
import com.simplemobiletools.gallery.models.Directory import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import java.io.* import java.io.*
import java.util.* import java.util.*
@ -117,7 +117,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
showFilterMediaDialog() showFilterMediaDialog()
} }
mIsPasswordProtectionPending = config.appPasswordProtectionOn mIsPasswordProtectionPending = config.isAppPasswordProtectionOn
setupLatestMediaId() setupLatestMediaId()
// notify some users about the Clock app // notify some users about the Clock app
@ -664,14 +664,22 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {
if (requestCode == PICK_MEDIA && resultData != null) { if (requestCode == PICK_MEDIA && resultData != null) {
val resultIntent = Intent() val resultIntent = Intent()
var resultUri: Uri? = null
if (mIsThirdPartyIntent) { if (mIsThirdPartyIntent) {
when { when {
intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true -> fillExtraOutput(resultData) intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true -> {
resultUri = fillExtraOutput(resultData)
}
resultData.extras?.containsKey(PICKED_PATHS) == true -> fillPickedPaths(resultData, resultIntent) resultData.extras?.containsKey(PICKED_PATHS) == true -> fillPickedPaths(resultData, resultIntent)
else -> fillIntentPath(resultData, resultIntent) else -> fillIntentPath(resultData, resultIntent)
} }
} }
if (resultUri != null) {
resultIntent.data = resultUri
resultIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
}
setResult(Activity.RESULT_OK, resultIntent) setResult(Activity.RESULT_OK, resultIntent)
finish() finish()
} else if (requestCode == PICK_WALLPAPER) { } else if (requestCode == PICK_WALLPAPER) {
@ -682,22 +690,25 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
super.onActivityResult(requestCode, resultCode, resultData) super.onActivityResult(requestCode, resultCode, resultData)
} }
private fun fillExtraOutput(resultData: Intent) { private fun fillExtraOutput(resultData: Intent): Uri? {
val path = resultData.data.path val file = File(resultData.data.path)
var inputStream: InputStream? = null var inputStream: InputStream? = null
var outputStream: OutputStream? = null var outputStream: OutputStream? = null
try { try {
val output = intent.extras.get(MediaStore.EXTRA_OUTPUT) as Uri val output = intent.extras.get(MediaStore.EXTRA_OUTPUT) as Uri
inputStream = FileInputStream(File(path)) inputStream = FileInputStream(file)
outputStream = contentResolver.openOutputStream(output) outputStream = contentResolver.openOutputStream(output)
inputStream.copyTo(outputStream) inputStream.copyTo(outputStream)
} catch (e: SecurityException) { } catch (e: SecurityException) {
showErrorToast(e) showErrorToast(e)
} catch (ignored: FileNotFoundException) { } catch (ignored: FileNotFoundException) {
return getFilePublicUri(file, BuildConfig.APPLICATION_ID)
} finally { } finally {
inputStream?.close() inputStream?.close()
outputStream?.close() outputStream?.close()
} }
return null
} }
private fun fillPickedPaths(resultData: Intent, resultIntent: Intent) { private fun fillPickedPaths(resultData: Intent, resultIntent: Intent) {
@ -1228,6 +1239,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
add(Release(184, R.string.release_184)) add(Release(184, R.string.release_184))
add(Release(201, R.string.release_201)) add(Release(201, R.string.release_201))
add(Release(202, R.string.release_202)) add(Release(202, R.string.release_202))
add(Release(206, R.string.release_206))
checkWhatsNew(this, BuildConfig.VERSION_CODE) checkWhatsNew(this, BuildConfig.VERSION_CODE)
} }
} }

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.app.Activity import android.app.Activity
import android.app.SearchManager import android.app.SearchManager
@ -31,21 +31,21 @@ import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.commons.views.MyGridLayoutManager import com.simplemobiletools.commons.views.MyGridLayoutManager
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.MediaAdapter import com.simplemobiletools.gallery.pro.adapters.MediaAdapter
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask import com.simplemobiletools.gallery.pro.asynctasks.GetMediaAsynctask
import com.simplemobiletools.gallery.dialogs.ChangeGroupingDialog import com.simplemobiletools.gallery.pro.dialogs.ChangeGroupingDialog
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog import com.simplemobiletools.gallery.pro.dialogs.ChangeSortingDialog
import com.simplemobiletools.gallery.dialogs.ExcludeFolderDialog import com.simplemobiletools.gallery.pro.dialogs.ExcludeFolderDialog
import com.simplemobiletools.gallery.dialogs.FilterMediaDialog import com.simplemobiletools.gallery.pro.dialogs.FilterMediaDialog
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.interfaces.DirectoryDao import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
import com.simplemobiletools.gallery.interfaces.MediaOperationsListener import com.simplemobiletools.gallery.pro.interfaces.MediaOperationsListener
import com.simplemobiletools.gallery.interfaces.MediumDao import com.simplemobiletools.gallery.pro.interfaces.MediumDao
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.models.ThumbnailItem import com.simplemobiletools.gallery.pro.models.ThumbnailItem
import com.simplemobiletools.gallery.models.ThumbnailSection import com.simplemobiletools.gallery.pro.models.ThumbnailSection
import kotlinx.android.synthetic.main.activity_media.* import kotlinx.android.synthetic.main.activity_media.*
import java.io.File import java.io.File
import java.io.IOException import java.io.IOException
@ -249,6 +249,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
R.id.stop_showing_hidden -> tryToggleTemporarilyShowHidden() R.id.stop_showing_hidden -> tryToggleTemporarilyShowHidden()
R.id.increase_column_count -> increaseColumnCount() R.id.increase_column_count -> increaseColumnCount()
R.id.reduce_column_count -> reduceColumnCount() R.id.reduce_column_count -> reduceColumnCount()
R.id.slideshow -> startSlideshow()
R.id.settings -> launchSettings() R.id.settings -> launchSettings()
R.id.about -> launchAbout() R.id.about -> launchAbout()
else -> return super.onOptionsItemSelected(item) else -> return super.onOptionsItemSelected(item)
@ -256,6 +257,19 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
return true return true
} }
private fun startSlideshow() {
if (mMedia.isNotEmpty()) {
Intent(this, ViewPagerActivity::class.java).apply {
val item = mMedia.firstOrNull { it is Medium } as? Medium
?: return
putExtra(PATH, item.path)
putExtra(SHOW_ALL, mShowAll)
putExtra(SLIDESHOW_START_ON_ENTER, true)
startActivity(this)
}
}
}
private fun storeStateVariables() { private fun storeStateVariables() {
config.apply { config.apply {
mStoredAnimateGifs = animateGifs mStoredAnimateGifs = animateGifs
@ -838,7 +852,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
return return
} }
if (config.useRecycleBin && !filtered.first().path.startsWith(filesDir.absolutePath)) { if (config.useRecycleBin && !filtered.first().path.startsWith(recycleBinPath)) {
val movingItems = resources.getQuantityString(R.plurals.moving_items_into_bin, filtered.size, filtered.size) val movingItems = resources.getQuantityString(R.plurals.moving_items_into_bin, filtered.size, filtered.size)
toast(movingItems) toast(movingItems)

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.content.res.Configuration import android.content.res.Configuration
import android.graphics.Bitmap import android.graphics.Bitmap
@ -17,9 +17,9 @@ import com.simplemobiletools.commons.extensions.showErrorToast
import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
import com.simplemobiletools.commons.helpers.isPiePlus import com.simplemobiletools.commons.helpers.isPiePlus
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.PATH import com.simplemobiletools.gallery.pro.helpers.PATH
import kotlinx.android.synthetic.main.activity_panorama_photo.* import kotlinx.android.synthetic.main.activity_panorama_photo.*
open class PanoramaPhotoActivity : SimpleActivity() { open class PanoramaPhotoActivity : SimpleActivity() {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.content.res.Configuration import android.content.res.Configuration
import android.graphics.Color import android.graphics.Color
@ -19,12 +19,12 @@ import com.simplemobiletools.commons.extensions.showErrorToast
import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
import com.simplemobiletools.commons.helpers.isPiePlus import com.simplemobiletools.commons.helpers.isPiePlus
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.HIDE_PLAY_PAUSE_DELAY import com.simplemobiletools.gallery.pro.helpers.HIDE_PLAY_PAUSE_DELAY
import com.simplemobiletools.gallery.helpers.MIN_SKIP_LENGTH import com.simplemobiletools.gallery.pro.helpers.MIN_SKIP_LENGTH
import com.simplemobiletools.gallery.helpers.PATH import com.simplemobiletools.gallery.pro.helpers.PATH
import com.simplemobiletools.gallery.helpers.PLAY_PAUSE_VISIBLE_ALPHA import com.simplemobiletools.gallery.pro.helpers.PLAY_PAUSE_VISIBLE_ALPHA
import kotlinx.android.synthetic.main.activity_panorama_video.* import kotlinx.android.synthetic.main.activity_panorama_video.*
import kotlinx.android.synthetic.main.bottom_video_time_holder.* import kotlinx.android.synthetic.main.bottom_video_time_holder.*
import java.io.File import java.io.File

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.os.Bundle import android.os.Bundle

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.content.Intent import android.content.Intent
import android.content.res.Configuration import android.content.res.Configuration
@ -9,18 +9,20 @@ import android.os.Bundle
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import android.view.WindowManager
import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.dialogs.PropertiesDialog
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.IS_FROM_GALLERY import com.simplemobiletools.commons.helpers.IS_FROM_GALLERY
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
import com.simplemobiletools.gallery.R import com.simplemobiletools.commons.helpers.isPiePlus
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.fragments.PhotoFragment import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.fragments.VideoFragment import com.simplemobiletools.gallery.pro.fragments.PhotoFragment
import com.simplemobiletools.gallery.fragments.ViewPagerFragment import com.simplemobiletools.gallery.pro.fragments.VideoFragment
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.fragments.ViewPagerFragment
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.pro.models.Medium
import kotlinx.android.synthetic.main.bottom_actions.* import kotlinx.android.synthetic.main.bottom_actions.*
import kotlinx.android.synthetic.main.fragment_holder.* import kotlinx.android.synthetic.main.fragment_holder.*
import java.io.File import java.io.File
@ -60,22 +62,31 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
private fun checkIntent(savedInstanceState: Bundle? = null) { private fun checkIntent(savedInstanceState: Bundle? = null) {
mUri = intent.data ?: return mUri = intent.data ?: return
var filename = getFilenameFromUri(mUri!!)
if (intent.extras?.containsKey(REAL_FILE_PATH) == true) { if (intent.extras?.containsKey(REAL_FILE_PATH) == true) {
val realPath = intent.extras.getString(REAL_FILE_PATH) val realPath = intent.extras.getString(REAL_FILE_PATH)
if (realPath != null) {
if (realPath.getFilenameFromPath().contains('.') || filename.contains('.')) {
sendViewPagerIntent(realPath) sendViewPagerIntent(realPath)
finish() finish()
return return
} else {
filename = realPath.getFilenameFromPath()
}
}
} }
mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false) mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false)
if (mUri!!.scheme == "file") { if (mUri!!.scheme == "file") {
if (filename.contains('.')) {
scanPathRecursively(mUri!!.path) scanPathRecursively(mUri!!.path)
sendViewPagerIntent(mUri!!.path) sendViewPagerIntent(mUri!!.path)
finish() finish()
return return
}
} else { } else {
val path = applicationContext.getRealPathFromURI(mUri!!) ?: "" val path = applicationContext.getRealPathFromURI(mUri!!) ?: ""
if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms") { if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.')) {
scanPathRecursively(mUri!!.path) scanPathRecursively(mUri!!.path)
sendViewPagerIntent(path) sendViewPagerIntent(path)
finish() finish()
@ -83,10 +94,14 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
} }
} }
if (isPiePlus()) {
window.attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
}
showSystemUI(true) showSystemUI(true)
val bundle = Bundle() val bundle = Bundle()
val file = File(mUri.toString()) val file = File(mUri.toString())
val filename = getFilenameFromUri(mUri!!)
val type = when { val type = when {
filename.isVideoFast() -> TYPE_VIDEOS filename.isVideoFast() -> TYPE_VIDEOS
filename.isGif() -> TYPE_GIFS filename.isGif() -> TYPE_GIFS
@ -95,6 +110,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
else -> TYPE_IMAGES else -> TYPE_IMAGES
} }
mIsVideo = type == TYPE_VIDEOS
mMedium = Medium(null, filename, 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 supportActionBar?.title = mMedium!!.name
bundle.putSerializable(MEDIUM, mMedium) bundle.putSerializable(MEDIUM, mMedium)
@ -181,7 +197,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
} }
private fun initBottomActionButtons() { private fun initBottomActionButtons() {
arrayListOf(bottom_favorite, bottom_delete, bottom_rotate, bottom_properties, bottom_change_orientation, bottom_slideshow, bottom_show_on_map, bottom_toggle_file_visibility).forEach { arrayListOf(bottom_favorite, bottom_delete, bottom_rotate, bottom_properties, bottom_change_orientation, bottom_slideshow, bottom_show_on_map,
bottom_toggle_file_visibility, bottom_rename).forEach {
it.beGone() it.beGone()
} }

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
@ -13,7 +13,7 @@ import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.helpers.isNougatPlus import com.simplemobiletools.commons.helpers.isNougatPlus
import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.theartofdev.edmodo.cropper.CropImageView import com.theartofdev.edmodo.cropper.CropImageView
import kotlinx.android.synthetic.main.activity_set_wallpaper.* import kotlinx.android.synthetic.main.activity_set_wallpaper.*
import kotlinx.android.synthetic.main.bottom_set_wallpaper_actions.* import kotlinx.android.synthetic.main.bottom_set_wallpaper_actions.*

View file

@ -1,7 +1,6 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.content.Intent import android.content.Intent
import android.content.res.Resources
import android.os.Bundle import android.os.Bundle
import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog
@ -11,40 +10,37 @@ import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT
import com.simplemobiletools.commons.helpers.SHOW_ALL_TABS import com.simplemobiletools.commons.helpers.SHOW_ALL_TABS
import com.simplemobiletools.commons.helpers.sumByLong import com.simplemobiletools.commons.helpers.sumByLong
import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.dialogs.ManageBottomActionsDialog import com.simplemobiletools.gallery.pro.dialogs.ManageBottomActionsDialog
import com.simplemobiletools.gallery.dialogs.ManageExtendedDetailsDialog import com.simplemobiletools.gallery.pro.dialogs.ManageExtendedDetailsDialog
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.extensions.emptyTheRecycleBin import com.simplemobiletools.gallery.pro.extensions.emptyTheRecycleBin
import com.simplemobiletools.gallery.extensions.galleryDB import com.simplemobiletools.gallery.pro.extensions.galleryDB
import com.simplemobiletools.gallery.extensions.showRecycleBinEmptyingDialog import com.simplemobiletools.gallery.pro.extensions.showRecycleBinEmptyingDialog
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import kotlinx.android.synthetic.main.activity_settings.* import kotlinx.android.synthetic.main.activity_settings.*
import java.util.* import java.util.*
class SettingsActivity : SimpleActivity() { class SettingsActivity : SimpleActivity() {
lateinit var res: Resources
private var mRecycleBinContentSize = 0L private var mRecycleBinContentSize = 0L
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_settings) setContentView(R.layout.activity_settings)
res = resources
} }
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
setupPurchaseThankYou()
setupCustomizeColors() setupCustomizeColors()
setupUseEnglish() setupUseEnglish()
setupAvoidWhatsNew()
setupManageIncludedFolders() setupManageIncludedFolders()
setupManageExcludedFolders() setupManageExcludedFolders()
setupManageHiddenFolders() setupManageHiddenFolders()
setupShowHiddenItems() setupShowHiddenItems()
setupDoExtraCheck() setupDoExtraCheck()
setupAutoplayVideos() setupAutoplayVideos()
setupRememberLastVideo()
setupLoopVideos() setupLoopVideos()
setupAnimateGifs() setupAnimateGifs()
setupMaxBrightness() setupMaxBrightness()
@ -53,8 +49,9 @@ class SettingsActivity : SimpleActivity() {
setupScrollHorizontally() setupScrollHorizontally()
setupScreenRotation() setupScreenRotation()
setupHideSystemUI() setupHideSystemUI()
setupPasswordProtection() setupHiddenItemPasswordProtection()
setupAppPasswordProtection() setupAppPasswordProtection()
setupFileDeletionPasswordProtection()
setupDeleteEmptyFolders() setupDeleteEmptyFolders()
setupAllowPhotoGestures() setupAllowPhotoGestures()
setupAllowVideoGestures() setupAllowVideoGestures()
@ -89,13 +86,6 @@ 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() { private fun setupCustomizeColors() {
settings_customize_colors_holder.setOnClickListener { settings_customize_colors_holder.setOnClickListener {
startCustomizationActivity() startCustomizationActivity()
@ -112,14 +102,6 @@ class SettingsActivity : SimpleActivity() {
} }
} }
private fun setupAvoidWhatsNew() {
settings_avoid_whats_new.isChecked = config.avoidWhatsNew
settings_avoid_whats_new_holder.setOnClickListener {
settings_avoid_whats_new.toggle()
config.avoidWhatsNew = settings_avoid_whats_new.isChecked
}
}
private fun setupManageIncludedFolders() { private fun setupManageIncludedFolders() {
settings_manage_included_folders_holder.setOnClickListener { settings_manage_included_folders_holder.setOnClickListener {
startActivity(Intent(this, IncludedFoldersActivity::class.java)) startActivity(Intent(this, IncludedFoldersActivity::class.java))
@ -174,6 +156,14 @@ class SettingsActivity : SimpleActivity() {
} }
} }
private fun setupRememberLastVideo() {
settings_remember_last_video_position.isChecked = config.rememberLastVideoPosition
settings_remember_last_video_position_holder.setOnClickListener {
settings_remember_last_video_position.toggle()
config.rememberLastVideoPosition = settings_remember_last_video_position.isChecked
}
}
private fun setupLoopVideos() { private fun setupLoopVideos() {
settings_loop_videos.isChecked = config.loopVideos settings_loop_videos.isChecked = config.loopVideos
settings_loop_videos_holder.setOnClickListener { settings_loop_videos_holder.setOnClickListener {
@ -235,20 +225,20 @@ class SettingsActivity : SimpleActivity() {
} }
} }
private fun setupPasswordProtection() { private fun setupHiddenItemPasswordProtection() {
settings_password_protection.isChecked = config.isPasswordProtectionOn settings_hidden_item_password_protection.isChecked = config.isHiddenPasswordProtectionOn
settings_password_protection_holder.setOnClickListener { settings_hidden_item_password_protection_holder.setOnClickListener {
val tabToShow = if (config.isPasswordProtectionOn) config.protectionType else SHOW_ALL_TABS val tabToShow = if (config.isHiddenPasswordProtectionOn) config.hiddenProtectionType else SHOW_ALL_TABS
SecurityDialog(this, config.passwordHash, tabToShow) { hash, type, success -> SecurityDialog(this, config.hiddenPasswordHash, tabToShow) { hash, type, success ->
if (success) { if (success) {
val hasPasswordProtection = config.isPasswordProtectionOn val hasPasswordProtection = config.isHiddenPasswordProtectionOn
settings_password_protection.isChecked = !hasPasswordProtection settings_hidden_item_password_protection.isChecked = !hasPasswordProtection
config.isPasswordProtectionOn = !hasPasswordProtection config.isHiddenPasswordProtectionOn = !hasPasswordProtection
config.passwordHash = if (hasPasswordProtection) "" else hash config.hiddenPasswordHash = if (hasPasswordProtection) "" else hash
config.protectionType = type config.hiddenProtectionType = type
if (config.isPasswordProtectionOn) { if (config.isHiddenPasswordProtectionOn) {
val confirmationTextId = if (config.protectionType == PROTECTION_FINGERPRINT) val confirmationTextId = if (config.hiddenProtectionType == PROTECTION_FINGERPRINT)
R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully
ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { } ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { }
} }
@ -258,18 +248,18 @@ class SettingsActivity : SimpleActivity() {
} }
private fun setupAppPasswordProtection() { private fun setupAppPasswordProtection() {
settings_app_password_protection.isChecked = config.appPasswordProtectionOn settings_app_password_protection.isChecked = config.isAppPasswordProtectionOn
settings_app_password_protection_holder.setOnClickListener { settings_app_password_protection_holder.setOnClickListener {
val tabToShow = if (config.appPasswordProtectionOn) config.appProtectionType else SHOW_ALL_TABS val tabToShow = if (config.isAppPasswordProtectionOn) config.appProtectionType else SHOW_ALL_TABS
SecurityDialog(this, config.appPasswordHash, tabToShow) { hash, type, success -> SecurityDialog(this, config.appPasswordHash, tabToShow) { hash, type, success ->
if (success) { if (success) {
val hasPasswordProtection = config.appPasswordProtectionOn val hasPasswordProtection = config.isAppPasswordProtectionOn
settings_app_password_protection.isChecked = !hasPasswordProtection settings_app_password_protection.isChecked = !hasPasswordProtection
config.appPasswordProtectionOn = !hasPasswordProtection config.isAppPasswordProtectionOn = !hasPasswordProtection
config.appPasswordHash = if (hasPasswordProtection) "" else hash config.appPasswordHash = if (hasPasswordProtection) "" else hash
config.appProtectionType = type config.appProtectionType = type
if (config.appPasswordProtectionOn) { if (config.isAppPasswordProtectionOn) {
val confirmationTextId = if (config.appProtectionType == PROTECTION_FINGERPRINT) val confirmationTextId = if (config.appProtectionType == PROTECTION_FINGERPRINT)
R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully
ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { } ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { }
@ -279,6 +269,28 @@ class SettingsActivity : SimpleActivity() {
} }
} }
private fun setupFileDeletionPasswordProtection() {
settings_file_deletion_password_protection.isChecked = config.isDeletePasswordProtectionOn
settings_file_deletion_password_protection_holder.setOnClickListener {
val tabToShow = if (config.isDeletePasswordProtectionOn) config.deleteProtectionType else SHOW_ALL_TABS
SecurityDialog(this, config.deletePasswordHash, tabToShow) { hash, type, success ->
if (success) {
val hasPasswordProtection = config.isDeletePasswordProtectionOn
settings_file_deletion_password_protection.isChecked = !hasPasswordProtection
config.isDeletePasswordProtectionOn = !hasPasswordProtection
config.deletePasswordHash = if (hasPasswordProtection) "" else hash
config.deleteProtectionType = type
if (config.isDeletePasswordProtectionOn) {
val confirmationTextId = if (config.deleteProtectionType == PROTECTION_FINGERPRINT)
R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully
ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { }
}
}
}
}
}
private fun setupDeleteEmptyFolders() { private fun setupDeleteEmptyFolders() {
settings_delete_empty_folders.isChecked = config.deleteEmptyFolders settings_delete_empty_folders.isChecked = config.deleteEmptyFolders
settings_delete_empty_folders_holder.setOnClickListener { settings_delete_empty_folders_holder.setOnClickListener {
@ -424,9 +436,9 @@ class SettingsActivity : SimpleActivity() {
settings_screen_rotation.text = getScreenRotationText() settings_screen_rotation.text = getScreenRotationText()
settings_screen_rotation_holder.setOnClickListener { settings_screen_rotation_holder.setOnClickListener {
val items = arrayListOf( val items = arrayListOf(
RadioItem(ROTATE_BY_SYSTEM_SETTING, res.getString(R.string.screen_rotation_system_setting)), RadioItem(ROTATE_BY_SYSTEM_SETTING, getString(R.string.screen_rotation_system_setting)),
RadioItem(ROTATE_BY_DEVICE_ROTATION, res.getString(R.string.screen_rotation_device_rotation)), RadioItem(ROTATE_BY_DEVICE_ROTATION, getString(R.string.screen_rotation_device_rotation)),
RadioItem(ROTATE_BY_ASPECT_RATIO, res.getString(R.string.screen_rotation_aspect_ratio))) RadioItem(ROTATE_BY_ASPECT_RATIO, getString(R.string.screen_rotation_aspect_ratio)))
RadioGroupDialog(this@SettingsActivity, items, config.screenRotation) { RadioGroupDialog(this@SettingsActivity, items, config.screenRotation) {
config.screenRotation = it as Int config.screenRotation = it as Int

View file

@ -1,7 +1,7 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
open class SimpleActivity : BaseSimpleActivity() { open class SimpleActivity : BaseSimpleActivity() {
override fun getAppIconIDs() = arrayListOf( override fun getAppIconIDs() = arrayListOf(

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.content.Intent import android.content.Intent
import com.simplemobiletools.commons.activities.BaseSplashActivity import com.simplemobiletools.commons.activities.BaseSplashActivity

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.os.Bundle import android.os.Bundle

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.activities package com.simplemobiletools.gallery.pro.activities
import android.animation.Animator import android.animation.Animator
import android.animation.ValueAnimator import android.animation.ValueAnimator
@ -25,6 +25,7 @@ import android.view.MenuItem
import android.view.View import android.view.View
import android.view.WindowManager import android.view.WindowManager
import android.view.animation.DecelerateInterpolator import android.view.animation.DecelerateInterpolator
import android.widget.Toast
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.dialogs.PropertiesDialog
@ -32,19 +33,19 @@ import com.simplemobiletools.commons.dialogs.RenameItemDialog
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.MyPagerAdapter import com.simplemobiletools.gallery.pro.adapters.MyPagerAdapter
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask import com.simplemobiletools.gallery.pro.asynctasks.GetMediaAsynctask
import com.simplemobiletools.gallery.dialogs.DeleteWithRememberDialog import com.simplemobiletools.gallery.pro.dialogs.DeleteWithRememberDialog
import com.simplemobiletools.gallery.dialogs.SaveAsDialog import com.simplemobiletools.gallery.pro.dialogs.SaveAsDialog
import com.simplemobiletools.gallery.dialogs.SlideshowDialog import com.simplemobiletools.gallery.pro.dialogs.SlideshowDialog
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.fragments.PhotoFragment import com.simplemobiletools.gallery.pro.fragments.PhotoFragment
import com.simplemobiletools.gallery.fragments.VideoFragment import com.simplemobiletools.gallery.pro.fragments.VideoFragment
import com.simplemobiletools.gallery.fragments.ViewPagerFragment import com.simplemobiletools.gallery.pro.fragments.ViewPagerFragment
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.models.ThumbnailItem import com.simplemobiletools.gallery.pro.models.ThumbnailItem
import kotlinx.android.synthetic.main.activity_medium.* import kotlinx.android.synthetic.main.activity_medium.*
import kotlinx.android.synthetic.main.bottom_actions.* import kotlinx.android.synthetic.main.bottom_actions.*
import java.io.File import java.io.File
@ -68,6 +69,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
private var mSlideshowMoveBackwards = false private var mSlideshowMoveBackwards = false
private var mSlideshowMedia = mutableListOf<Medium>() private var mSlideshowMedia = mutableListOf<Medium>()
private var mAreSlideShowMediaVisible = false private var mAreSlideShowMediaVisible = false
private var mIsOrientationLocked = false private var mIsOrientationLocked = false
private var mMediaFiles = ArrayList<Medium>() private var mMediaFiles = ArrayList<Medium>()
@ -154,6 +156,78 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_viewpager, menu)
val currentMedium = getCurrentMedium() ?: return true
currentMedium.isFavorite = mFavoritePaths.contains(currentMedium.path)
val visibleBottomActions = if (config.bottomActions) config.visibleBottomActions else 0
menu.apply {
findItem(R.id.menu_show_on_map).isVisible = visibleBottomActions and BOTTOM_ACTION_SHOW_ON_MAP == 0
findItem(R.id.menu_slideshow).isVisible = visibleBottomActions and BOTTOM_ACTION_SLIDESHOW == 0
findItem(R.id.menu_properties).isVisible = visibleBottomActions and BOTTOM_ACTION_PROPERTIES == 0
findItem(R.id.menu_delete).isVisible = visibleBottomActions and BOTTOM_ACTION_DELETE == 0
findItem(R.id.menu_share).isVisible = visibleBottomActions and BOTTOM_ACTION_SHARE == 0
findItem(R.id.menu_edit).isVisible = visibleBottomActions and BOTTOM_ACTION_EDIT == 0 && !currentMedium.isSVG()
findItem(R.id.menu_rename).isVisible = visibleBottomActions and BOTTOM_ACTION_RENAME == 0 && !currentMedium.getIsInRecycleBin()
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 && !currentMedium.getIsInRecycleBin()
findItem(R.id.menu_unhide).isVisible = currentMedium.isHidden() && visibleBottomActions and BOTTOM_ACTION_TOGGLE_VISIBILITY == 0 && !currentMedium.getIsInRecycleBin()
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(recycleBinPath)
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(
if (mRotationDegrees != 0) {
MenuItem.SHOW_AS_ACTION_ALWAYS
} else {
MenuItem.SHOW_AS_ACTION_IF_ROOM
})
}
if (visibleBottomActions != 0) {
updateBottomActionIcons(currentMedium)
}
return true
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (getCurrentMedium() == null)
return true
when (item.itemId) {
R.id.menu_set_as -> setAs(getCurrentPath())
R.id.menu_slideshow -> initSlideshow()
R.id.menu_copy_to -> copyMoveTo(true)
R.id.menu_move_to -> moveFileTo()
R.id.menu_open_with -> openPath(getCurrentPath(), true)
R.id.menu_hide -> toggleFileVisibility(true)
R.id.menu_unhide -> toggleFileVisibility(false)
R.id.menu_share -> shareMediumPath(getCurrentPath())
R.id.menu_delete -> checkDeleteConfirmation()
R.id.menu_rename -> renameFile()
R.id.menu_edit -> openEditor(getCurrentPath())
R.id.menu_properties -> showProperties()
R.id.menu_show_on_map -> showOnMap()
R.id.menu_rotate_right -> rotateImage(90)
R.id.menu_rotate_left -> rotateImage(270)
R.id.menu_rotate_one_eighty -> rotateImage(180)
R.id.menu_add_to_favorites -> toggleFavorite()
R.id.menu_remove_from_favorites -> toggleFavorite()
R.id.menu_restore_file -> restoreFile()
R.id.menu_force_portrait -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
R.id.menu_force_landscape -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
R.id.menu_default_orientation -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
R.id.menu_save_as -> saveImageAs()
R.id.menu_settings -> launchSettings()
else -> return super.onOptionsItemSelected(item)
}
return true
}
private fun initViewPager() { private fun initViewPager() {
measureScreen() measureScreen()
val uri = intent.data val uri = intent.data
@ -196,7 +270,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) { if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
if (isShowHiddenFlagNeeded()) { if (isShowHiddenFlagNeeded()) {
if (!config.isPasswordProtectionOn) { if (!config.isHiddenPasswordProtectionOn) {
config.temporarilyShowHidden = true config.temporarilyShowHidden = true
} }
} }
@ -222,6 +296,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
if (!isDestroyed) { if (!isDestroyed) {
if (mMediaFiles.isNotEmpty()) { if (mMediaFiles.isNotEmpty()) {
gotMedia(mMediaFiles as ArrayList<ThumbnailItem>) gotMedia(mMediaFiles as ArrayList<ThumbnailItem>)
checkSlideshowOnEnter()
} }
} }
} }
@ -285,78 +360,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_viewpager, menu)
val currentMedium = getCurrentMedium() ?: return true
currentMedium.isFavorite = mFavoritePaths.contains(currentMedium.path)
val visibleBottomActions = if (config.bottomActions) config.visibleBottomActions else 0
menu.apply {
findItem(R.id.menu_show_on_map).isVisible = visibleBottomActions and BOTTOM_ACTION_SHOW_ON_MAP == 0
findItem(R.id.menu_slideshow).isVisible = visibleBottomActions and BOTTOM_ACTION_SLIDESHOW == 0
findItem(R.id.menu_properties).isVisible = visibleBottomActions and BOTTOM_ACTION_PROPERTIES == 0
findItem(R.id.menu_delete).isVisible = visibleBottomActions and BOTTOM_ACTION_DELETE == 0
findItem(R.id.menu_share).isVisible = visibleBottomActions and BOTTOM_ACTION_SHARE == 0
findItem(R.id.menu_edit).isVisible = visibleBottomActions and BOTTOM_ACTION_EDIT == 0 && !currentMedium.isSVG()
findItem(R.id.menu_rename).isVisible = visibleBottomActions and BOTTOM_ACTION_RENAME == 0 && !currentMedium.getIsInRecycleBin()
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 && !currentMedium.getIsInRecycleBin()
findItem(R.id.menu_unhide).isVisible = currentMedium.isHidden() && visibleBottomActions and BOTTOM_ACTION_TOGGLE_VISIBILITY == 0 && !currentMedium.getIsInRecycleBin()
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.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(
if (mRotationDegrees != 0) {
MenuItem.SHOW_AS_ACTION_ALWAYS
} else {
MenuItem.SHOW_AS_ACTION_IF_ROOM
})
}
if (visibleBottomActions != 0) {
updateBottomActionIcons(currentMedium)
}
return true
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (getCurrentMedium() == null)
return true
when (item.itemId) {
R.id.menu_set_as -> setAs(getCurrentPath())
R.id.menu_slideshow -> initSlideshow()
R.id.menu_copy_to -> copyMoveTo(true)
R.id.menu_move_to -> copyMoveTo(false)
R.id.menu_open_with -> openPath(getCurrentPath(), true)
R.id.menu_hide -> toggleFileVisibility(true)
R.id.menu_unhide -> toggleFileVisibility(false)
R.id.menu_share -> shareMediumPath(getCurrentPath())
R.id.menu_delete -> checkDeleteConfirmation()
R.id.menu_rename -> renameFile()
R.id.menu_edit -> openEditor(getCurrentPath())
R.id.menu_properties -> showProperties()
R.id.menu_show_on_map -> showOnMap()
R.id.menu_rotate_right -> rotateImage(90)
R.id.menu_rotate_left -> rotateImage(270)
R.id.menu_rotate_one_eighty -> rotateImage(180)
R.id.menu_add_to_favorites -> toggleFavorite()
R.id.menu_remove_from_favorites -> toggleFavorite()
R.id.menu_restore_file -> restoreFile()
R.id.menu_force_portrait -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
R.id.menu_force_landscape -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
R.id.menu_default_orientation -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
R.id.menu_save_as -> saveImageAs()
R.id.menu_settings -> launchSettings()
else -> return super.onOptionsItemSelected(item)
}
return true
}
private fun updatePagerItems(media: MutableList<Medium>) { private fun updatePagerItems(media: MutableList<Medium>) {
val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, media) val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, media)
if (!isDestroyed) { if (!isDestroyed) {
@ -369,6 +372,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
} }
private fun checkSlideshowOnEnter() {
if (intent.getBooleanExtra(SLIDESHOW_START_ON_ENTER, false)) {
initSlideshow()
}
}
private fun initSlideshow() { private fun initSlideshow() {
SlideshowDialog(this) { SlideshowDialog(this) {
startSlideshow() startSlideshow()
@ -444,9 +453,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
private fun slideshowEnded(forward: Boolean) { private fun slideshowEnded(forward: Boolean) {
if (config.loopSlideshow) { if (config.loopSlideshow) {
if (forward) { if (forward) {
view_pager.setCurrentItem(view_pager.adapter!!.count - 1, false)
} else {
view_pager.setCurrentItem(0, false) view_pager.setCurrentItem(0, false)
} else {
view_pager.setCurrentItem(view_pager.adapter!!.count - 1, false)
} }
} else { } else {
stopSlideshow() stopSlideshow()
@ -514,8 +523,19 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
} }
private fun moveFileTo() {
handleDeletePasswordProtection {
copyMoveTo(false)
}
}
private fun copyMoveTo(isCopyOperation: Boolean) { private fun copyMoveTo(isCopyOperation: Boolean) {
val currPath = getCurrentPath() val currPath = getCurrentPath()
if (!isCopyOperation && currPath.startsWith(recycleBinPath)) {
toast(R.string.moving_recycle_bin_items_disabled, Toast.LENGTH_LONG)
return
}
val fileDirItems = arrayListOf(FileDirItem(currPath, currPath.getFilenameFromPath())) val fileDirItems = arrayListOf(FileDirItem(currPath, currPath.getFilenameFromPath()))
tryCopyMoveFilesTo(fileDirItems, isCopyOperation) { tryCopyMoveFilesTo(fileDirItems, isCopyOperation) {
config.tempFolderPath = "" config.tempFolderPath = ""
@ -586,7 +606,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
} }
val tmpPath = "${filesDir.absolutePath}/.tmp_${newPath.getFilenameFromPath()}" val tmpPath = "$recycleBinPath/.tmp_${newPath.getFilenameFromPath()}"
val tmpFileDirItem = FileDirItem(tmpPath, tmpPath.getFilenameFromPath()) val tmpFileDirItem = FileDirItem(tmpPath, tmpPath.getFilenameFromPath())
try { try {
getFileOutputStream(tmpFileDirItem) { getFileOutputStream(tmpFileDirItem) {
@ -904,7 +924,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
return return
} }
if (config.tempSkipDeleteConfirmation || config.skipDeleteConfirmation) { if (config.isDeletePasswordProtectionOn) {
handleDeletePasswordProtection {
deleteConfirmed()
}
} else if (config.tempSkipDeleteConfirmation || config.skipDeleteConfirmation) {
deleteConfirmed() deleteConfirmed()
} else { } else {
askConfirmDelete() askConfirmDelete()
@ -990,7 +1014,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
private fun gotMedia(thumbnailItems: ArrayList<ThumbnailItem>) { private fun gotMedia(thumbnailItems: ArrayList<ThumbnailItem>) {
val media = thumbnailItems.filter { it is Medium }.map { it as Medium } as ArrayList<Medium> val media = thumbnailItems.asSequence().filter { it is Medium }.map { it as Medium }.toMutableList() as ArrayList<Medium>
if (isDirEmpty(media) || media.hashCode() == mPrevHashcode) { if (isDirEmpty(media) || media.hashCode() == mPrevHashcode) {
return return
} }

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.adapters package com.simplemobiletools.gallery.pro.adapters
import android.view.Menu import android.view.Menu
import android.view.View import android.view.View
@ -16,14 +16,14 @@ import com.simplemobiletools.commons.helpers.OTG_PATH
import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.commons.views.FastScroller import com.simplemobiletools.commons.views.FastScroller
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.dialogs.ExcludeFolderDialog import com.simplemobiletools.gallery.pro.dialogs.ExcludeFolderDialog
import com.simplemobiletools.gallery.dialogs.PickMediumDialog import com.simplemobiletools.gallery.pro.dialogs.PickMediumDialog
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.interfaces.DirectoryOperationsListener import com.simplemobiletools.gallery.pro.interfaces.DirectoryOperationsListener
import com.simplemobiletools.gallery.models.AlbumCover import com.simplemobiletools.gallery.pro.models.AlbumCover
import com.simplemobiletools.gallery.models.Directory import com.simplemobiletools.gallery.pro.models.Directory
import kotlinx.android.synthetic.main.directory_item_list.view.* import kotlinx.android.synthetic.main.directory_item_list.view.*
import java.io.File import java.io.File
@ -96,7 +96,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
R.id.cab_unhide -> toggleFoldersVisibility(false) R.id.cab_unhide -> toggleFoldersVisibility(false)
R.id.cab_exclude -> tryExcludeFolder() R.id.cab_exclude -> tryExcludeFolder()
R.id.cab_copy_to -> copyMoveTo(true) R.id.cab_copy_to -> copyMoveTo(true)
R.id.cab_move_to -> copyMoveTo(false) R.id.cab_move_to -> moveFilesTo()
R.id.cab_select_all -> selectAll() R.id.cab_select_all -> selectAll()
R.id.cab_delete -> askConfirmDelete() R.id.cab_delete -> askConfirmDelete()
R.id.cab_select_photo -> changeAlbumCover(false) R.id.cab_select_photo -> changeAlbumCover(false)
@ -310,6 +310,12 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
listener?.recheckPinnedFolders() listener?.recheckPinnedFolders()
} }
private fun moveFilesTo() {
activity.handleDeletePasswordProtection {
copyMoveTo(false)
}
}
private fun copyMoveTo(isCopyOperation: Boolean) { private fun copyMoveTo(isCopyOperation: Boolean) {
val paths = ArrayList<String>() val paths = ArrayList<String>()
val showHidden = activity.config.shouldShowHidden val showHidden = activity.config.shouldShowHidden
@ -343,9 +349,12 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
} }
private fun askConfirmDelete() { private fun askConfirmDelete() {
if (config.skipDeleteConfirmation) { when {
config.isDeletePasswordProtectionOn -> activity.handleDeletePasswordProtection {
deleteFolders() deleteFolders()
} else { }
config.skipDeleteConfirmation -> deleteFolders()
else -> {
val itemsCnt = selectedKeys.size val itemsCnt = selectedKeys.size
val items = resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt) val items = resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)
val fileDirItem = getFirstSelectedItem() ?: return val fileDirItem = getFirstSelectedItem() ?: return
@ -363,6 +372,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
} }
} }
} }
}
private fun deleteFolders() { private fun deleteFolders() {
if (selectedKeys.isEmpty()) { if (selectedKeys.isEmpty()) {

View file

@ -1,12 +1,12 @@
package com.simplemobiletools.gallery.adapters package com.simplemobiletools.gallery.pro.adapters
import android.content.Context import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.models.FilterItem import com.simplemobiletools.gallery.pro.models.FilterItem
import kotlinx.android.synthetic.main.editor_filter_item.view.* import kotlinx.android.synthetic.main.editor_filter_item.view.*
import java.util.* import java.util.*

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.adapters package com.simplemobiletools.gallery.pro.adapters
import android.view.Menu import android.view.Menu
import android.view.View import android.view.View
@ -7,8 +7,8 @@ import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import kotlinx.android.synthetic.main.item_manage_folder.view.* import kotlinx.android.synthetic.main.item_manage_folder.view.*
import java.util.* import java.util.*

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.adapters package com.simplemobiletools.gallery.pro.adapters
import android.view.Menu import android.view.Menu
import android.view.View import android.view.View
@ -8,9 +8,9 @@ import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
import com.simplemobiletools.commons.extensions.isPathOnSD import com.simplemobiletools.commons.extensions.isPathOnSD
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.extensions.removeNoMedia import com.simplemobiletools.gallery.pro.extensions.removeNoMedia
import kotlinx.android.synthetic.main.item_manage_folder.view.* import kotlinx.android.synthetic.main.item_manage_folder.view.*
import java.util.* import java.util.*

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.adapters package com.simplemobiletools.gallery.pro.adapters
import android.content.ContentProviderOperation import android.content.ContentProviderOperation
import android.media.ExifInterface import android.media.ExifInterface
@ -8,6 +8,7 @@ import android.provider.MediaStore
import android.view.Menu import android.view.Menu
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.Toast
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
@ -19,14 +20,14 @@ import com.simplemobiletools.commons.helpers.OTG_PATH
import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.commons.views.FastScroller import com.simplemobiletools.commons.views.FastScroller
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.dialogs.DeleteWithRememberDialog import com.simplemobiletools.gallery.pro.dialogs.DeleteWithRememberDialog
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_LIST import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_LIST
import com.simplemobiletools.gallery.interfaces.MediaOperationsListener import com.simplemobiletools.gallery.pro.interfaces.MediaOperationsListener
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.models.ThumbnailItem import com.simplemobiletools.gallery.pro.models.ThumbnailItem
import com.simplemobiletools.gallery.models.ThumbnailSection import com.simplemobiletools.gallery.pro.models.ThumbnailSection
import kotlinx.android.synthetic.main.photo_video_item_grid.view.* import kotlinx.android.synthetic.main.photo_video_item_grid.view.*
import kotlinx.android.synthetic.main.thumbnail_section.view.* import kotlinx.android.synthetic.main.thumbnail_section.view.*
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
@ -81,7 +82,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
visibleItemPaths.add(tmbItem.path) visibleItemPaths.add(tmbItem.path)
} }
val allowLongPress = !allowMultiplePicks && tmbItem is Medium val allowLongPress = (!isAGetIntent || allowMultiplePicks) && tmbItem is Medium
holder.bindView(tmbItem, tmbItem is Medium, allowLongPress) { itemView, adapterPosition -> holder.bindView(tmbItem, tmbItem is Medium, allowLongPress) { itemView, adapterPosition ->
if (tmbItem is Medium) { if (tmbItem is Medium) {
setupThumbnail(itemView, tmbItem) setupThumbnail(itemView, tmbItem)
@ -115,7 +116,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
findItem(R.id.cab_rename).isVisible = selectedItems.firstOrNull()?.getIsInRecycleBin() == false findItem(R.id.cab_rename).isVisible = selectedItems.firstOrNull()?.getIsInRecycleBin() == false
findItem(R.id.cab_open_with).isVisible = isOneItemSelected findItem(R.id.cab_open_with).isVisible = isOneItemSelected
findItem(R.id.cab_confirm_selection).isVisible = isAGetIntent && allowMultiplePicks && selectedKeys.isNotEmpty() findItem(R.id.cab_confirm_selection).isVisible = isAGetIntent && allowMultiplePicks && selectedKeys.isNotEmpty()
findItem(R.id.cab_restore_recycle_bin_files).isVisible = selectedPaths.all { it.startsWith(activity.filesDir.absolutePath) } findItem(R.id.cab_restore_recycle_bin_files).isVisible = selectedPaths.all { it.startsWith(activity.recycleBinPath) }
checkHideBtnVisibility(this, selectedItems) checkHideBtnVisibility(this, selectedItems)
checkFavoriteBtnVisibility(this, selectedItems) checkFavoriteBtnVisibility(this, selectedItems)
@ -139,7 +140,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
R.id.cab_restore_recycle_bin_files -> restoreFiles() R.id.cab_restore_recycle_bin_files -> restoreFiles()
R.id.cab_share -> shareMedia() R.id.cab_share -> shareMedia()
R.id.cab_copy_to -> copyMoveTo(true) R.id.cab_copy_to -> copyMoveTo(true)
R.id.cab_move_to -> copyMoveTo(false) R.id.cab_move_to -> moveFilesTo()
R.id.cab_select_all -> selectAll() R.id.cab_select_all -> selectAll()
R.id.cab_open_with -> openPath() R.id.cab_open_with -> openPath()
R.id.cab_fix_date_taken -> fixDateTaken() R.id.cab_fix_date_taken -> fixDateTaken()
@ -274,12 +275,27 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
} }
} }
private fun moveFilesTo() {
activity.handleDeletePasswordProtection {
copyMoveTo(false)
}
}
private fun copyMoveTo(isCopyOperation: Boolean) { private fun copyMoveTo(isCopyOperation: Boolean) {
val paths = getSelectedPaths() val paths = getSelectedPaths()
val fileDirItems = paths.map { val recycleBinPath = activity.recycleBinPath
val fileDirItems = paths.asSequence().filter { isCopyOperation || !it.startsWith(recycleBinPath) }.map {
FileDirItem(it, it.getFilenameFromPath()) FileDirItem(it, it.getFilenameFromPath())
} as ArrayList }.toMutableList() as ArrayList
if (!isCopyOperation && paths.any { it.startsWith(recycleBinPath) }) {
activity.toast(R.string.moving_recycle_bin_items_disabled, Toast.LENGTH_LONG)
}
if (fileDirItems.isEmpty()) {
return
}
activity.tryCopyMoveFilesTo(fileDirItems, isCopyOperation) { activity.tryCopyMoveFilesTo(fileDirItems, isCopyOperation) {
config.tempFolderPath = "" config.tempFolderPath = ""
@ -341,7 +357,11 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
} }
private fun checkDeleteConfirmation() { private fun checkDeleteConfirmation() {
if (config.tempSkipDeleteConfirmation || config.skipDeleteConfirmation) { if (config.isDeletePasswordProtectionOn) {
activity.handleDeletePasswordProtection {
deleteFiles()
}
} else if (config.tempSkipDeleteConfirmation || config.skipDeleteConfirmation) {
deleteFiles() deleteFiles()
} else { } else {
askConfirmDelete() askConfirmDelete()
@ -350,7 +370,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
private fun askConfirmDelete() { private fun askConfirmDelete() {
val items = resources.getQuantityString(R.plurals.delete_items, selectedKeys.size, selectedKeys.size) val items = resources.getQuantityString(R.plurals.delete_items, selectedKeys.size, selectedKeys.size)
val isRecycleBin = getSelectedPaths().first().startsWith(activity.filesDir.absolutePath) val isRecycleBin = getSelectedPaths().first().startsWith(activity.recycleBinPath)
val baseString = if (config.useRecycleBin && !isRecycleBin) R.string.move_to_recycle_bin_confirmation else R.string.deletion_confirmation val baseString = if (config.useRecycleBin && !isRecycleBin) R.string.move_to_recycle_bin_confirmation else R.string.deletion_confirmation
val question = String.format(resources.getString(baseString), items) val question = String.format(resources.getString(baseString), items)
DeleteWithRememberDialog(activity, question) { DeleteWithRememberDialog(activity, question) {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.adapters package com.simplemobiletools.gallery.pro.adapters
import android.os.Bundle import android.os.Bundle
import android.os.Parcelable import android.os.Parcelable
@ -7,12 +7,12 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.PagerAdapter import androidx.viewpager.widget.PagerAdapter
import com.simplemobiletools.gallery.activities.ViewPagerActivity import com.simplemobiletools.gallery.pro.activities.ViewPagerActivity
import com.simplemobiletools.gallery.fragments.PhotoFragment import com.simplemobiletools.gallery.pro.fragments.PhotoFragment
import com.simplemobiletools.gallery.fragments.VideoFragment import com.simplemobiletools.gallery.pro.fragments.VideoFragment
import com.simplemobiletools.gallery.fragments.ViewPagerFragment import com.simplemobiletools.gallery.pro.fragments.ViewPagerFragment
import com.simplemobiletools.gallery.helpers.MEDIUM import com.simplemobiletools.gallery.pro.helpers.MEDIUM
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val media: MutableList<Medium>) : FragmentStatePagerAdapter(fm) { class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val media: MutableList<Medium>) : FragmentStatePagerAdapter(fm) {
private val fragments = HashMap<Int, ViewPagerFragment>() private val fragments = HashMap<Int, ViewPagerFragment>()

View file

@ -1,16 +1,16 @@
package com.simplemobiletools.gallery.asynctasks package com.simplemobiletools.gallery.pro.asynctasks
import android.content.Context import android.content.Context
import android.os.AsyncTask import android.os.AsyncTask
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.extensions.getFavoritePaths import com.simplemobiletools.gallery.pro.extensions.getFavoritePaths
import com.simplemobiletools.gallery.helpers.FAVORITES import com.simplemobiletools.gallery.pro.helpers.FAVORITES
import com.simplemobiletools.gallery.helpers.MediaFetcher import com.simplemobiletools.gallery.pro.helpers.MediaFetcher
import com.simplemobiletools.gallery.helpers.RECYCLE_BIN import com.simplemobiletools.gallery.pro.helpers.RECYCLE_BIN
import com.simplemobiletools.gallery.helpers.SHOW_ALL import com.simplemobiletools.gallery.pro.helpers.SHOW_ALL
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.models.ThumbnailItem import com.simplemobiletools.gallery.pro.models.ThumbnailItem
import java.util.* import java.util.*
class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage: Boolean = false, val isPickVideo: Boolean = false, class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage: Boolean = false, val isPickVideo: Boolean = false,

View file

@ -1,14 +1,14 @@
package com.simplemobiletools.gallery.databases package com.simplemobiletools.gallery.pro.databases
import android.content.Context import android.content.Context
import androidx.room.Database import androidx.room.Database
import androidx.room.Room import androidx.room.Room
import androidx.room.RoomDatabase import androidx.room.RoomDatabase
import com.simplemobiletools.gallery.objects.MyExecutor import com.simplemobiletools.gallery.pro.objects.MyExecutor
import com.simplemobiletools.gallery.interfaces.DirectoryDao import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
import com.simplemobiletools.gallery.interfaces.MediumDao import com.simplemobiletools.gallery.pro.interfaces.MediumDao
import com.simplemobiletools.gallery.models.Directory import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
@Database(entities = [(Directory::class), (Medium::class)], version = 4) @Database(entities = [(Directory::class), (Medium::class)], version = 4)
abstract class GalleryDatabase : RoomDatabase() { abstract class GalleryDatabase : RoomDatabase() {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import android.content.DialogInterface import android.content.DialogInterface
import android.view.View import android.view.View
@ -6,9 +6,9 @@ import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import kotlinx.android.synthetic.main.dialog_change_grouping.view.* import kotlinx.android.synthetic.main.dialog_change_grouping.view.*
class ChangeGroupingDialog(val activity: BaseSimpleActivity, val path: String = "", val callback: () -> Unit) : class ChangeGroupingDialog(val activity: BaseSimpleActivity, val path: String = "", val callback: () -> Unit) :

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import android.content.DialogInterface import android.content.DialogInterface
import android.view.View import android.view.View
@ -7,9 +7,9 @@ import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.helpers.SHOW_ALL import com.simplemobiletools.gallery.pro.helpers.SHOW_ALL
import kotlinx.android.synthetic.main.dialog_change_sorting.view.* import kotlinx.android.synthetic.main.dialog_change_sorting.view.*
class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorting: Boolean, showFolderCheckbox: Boolean, class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorting: Boolean, showFolderCheckbox: Boolean,

View file

@ -1,9 +1,9 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import android.app.Activity import android.app.Activity
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import kotlinx.android.synthetic.main.dialog_delete_with_remember.view.* import kotlinx.android.synthetic.main.dialog_delete_with_remember.view.*
class DeleteWithRememberDialog(val activity: Activity, val message: String, val callback: (remember: Boolean) -> Unit) { class DeleteWithRememberDialog(val activity: Activity, val message: String, val callback: (remember: Boolean) -> Unit) {

View file

@ -1,15 +1,15 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.RadioButton import android.widget.RadioButton
import android.widget.RadioGroup import android.widget.RadioGroup
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getBasePath import com.simplemobiletools.commons.extensions.getBasePath
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import kotlinx.android.synthetic.main.dialog_exclude_folder.view.* import kotlinx.android.synthetic.main.dialog_exclude_folder.view.*
class ExcludeFolderDialog(val activity: BaseSimpleActivity, val selectedPaths: List<String>, val callback: () -> Unit) { class ExcludeFolderDialog(val activity: BaseSimpleActivity, val selectedPaths: List<String>, val callback: () -> Unit) {
@ -34,7 +34,7 @@ class ExcludeFolderDialog(val activity: BaseSimpleActivity, val selectedPaths: L
} }
AlertDialog.Builder(activity) AlertDialog.Builder(activity)
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() }) .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
.setNegativeButton(R.string.cancel, null) .setNegativeButton(R.string.cancel, null)
.create().apply { .create().apply {
activity.setupDialogStuff(view, this) activity.setupDialogStuff(view, this)

View file

@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import kotlinx.android.synthetic.main.dialog_filter_media.view.* import kotlinx.android.synthetic.main.dialog_filter_media.view.*
class FilterMediaDialog(val activity: BaseSimpleActivity, val callback: (result: Int) -> Unit) { class FilterMediaDialog(val activity: BaseSimpleActivity, val callback: (result: Int) -> Unit) {

View file

@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import kotlinx.android.synthetic.main.dialog_manage_bottom_actions.view.* import kotlinx.android.synthetic.main.dialog_manage_bottom_actions.view.*
class ManageBottomActionsDialog(val activity: BaseSimpleActivity, val callback: (result: Int) -> Unit) { class ManageBottomActionsDialog(val activity: BaseSimpleActivity, val callback: (result: Int) -> Unit) {

View file

@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import kotlinx.android.synthetic.main.dialog_manage_extended_details.view.* import kotlinx.android.synthetic.main.dialog_manage_extended_details.view.*
class ManageExtendedDetailsDialog(val activity: BaseSimpleActivity, val callback: (result: Int) -> Unit) { class ManageExtendedDetailsDialog(val activity: BaseSimpleActivity, val callback: (result: Int) -> Unit) {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@ -6,14 +6,14 @@ import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.views.MyGridLayoutManager import com.simplemobiletools.commons.views.MyGridLayoutManager
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.DirectoryAdapter import com.simplemobiletools.gallery.pro.adapters.DirectoryAdapter
import com.simplemobiletools.gallery.extensions.addTempFolderIfNeeded import com.simplemobiletools.gallery.pro.extensions.addTempFolderIfNeeded
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.extensions.getCachedDirectories import com.simplemobiletools.gallery.pro.extensions.getCachedDirectories
import com.simplemobiletools.gallery.extensions.getSortedDirectories import com.simplemobiletools.gallery.pro.extensions.getSortedDirectories
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_GRID import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_GRID
import com.simplemobiletools.gallery.models.Directory import com.simplemobiletools.gallery.pro.models.Directory
import kotlinx.android.synthetic.main.dialog_directory_picker.view.* import kotlinx.android.synthetic.main.dialog_directory_picker.view.*
class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: String, val callback: (path: String) -> Unit) { class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: String, val callback: (path: String) -> Unit) {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@ -7,15 +7,15 @@ import com.simplemobiletools.commons.extensions.beGoneIf
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.views.MyGridLayoutManager import com.simplemobiletools.commons.views.MyGridLayoutManager
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.adapters.MediaAdapter import com.simplemobiletools.gallery.pro.adapters.MediaAdapter
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask import com.simplemobiletools.gallery.pro.asynctasks.GetMediaAsynctask
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.extensions.getCachedMedia import com.simplemobiletools.gallery.pro.extensions.getCachedMedia
import com.simplemobiletools.gallery.helpers.SHOW_ALL import com.simplemobiletools.gallery.pro.helpers.SHOW_ALL
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_GRID import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_GRID
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.models.ThumbnailItem import com.simplemobiletools.gallery.pro.models.ThumbnailItem
import kotlinx.android.synthetic.main.dialog_medium_picker.view.* import kotlinx.android.synthetic.main.dialog_medium_picker.view.*
class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val callback: (path: String) -> Unit) { class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val callback: (path: String) -> Unit) {

View file

@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import android.graphics.Point import android.graphics.Point
import android.widget.EditText import android.widget.EditText
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import kotlinx.android.synthetic.main.resize_image.view.* import kotlinx.android.synthetic.main.resize_image.view.*
class ResizeDialog(val activity: BaseSimpleActivity, val size: Point, val callback: (newSize: Point) -> Unit) { class ResizeDialog(val activity: BaseSimpleActivity, val size: Point, val callback: (newSize: Point) -> Unit) {

View file

@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import kotlinx.android.synthetic.main.dialog_save_as.view.* import kotlinx.android.synthetic.main.dialog_save_as.view.*
class SaveAsDialog(val activity: BaseSimpleActivity, val path: String, val appendFilename: Boolean, val callback: (savePath: String) -> Unit) { class SaveAsDialog(val activity: BaseSimpleActivity, val path: String, val appendFilename: Boolean, val callback: (savePath: String) -> Unit) {

View file

@ -1,14 +1,14 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.pro.dialogs
import androidx.appcompat.app.AlertDialog
import android.view.View import android.view.View
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.hideKeyboard import com.simplemobiletools.commons.extensions.hideKeyboard
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.helpers.SLIDESHOW_DEFAULT_INTERVAL import com.simplemobiletools.gallery.pro.helpers.SLIDESHOW_DEFAULT_INTERVAL
import kotlinx.android.synthetic.main.dialog_slideshow.view.* import kotlinx.android.synthetic.main.dialog_slideshow.view.*
class SlideshowDialog(val activity: BaseSimpleActivity, val callback: () -> Unit) { class SlideshowDialog(val activity: BaseSimpleActivity, val callback: () -> Unit) {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
@ -11,12 +11,12 @@ import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.models.FAQItem import com.simplemobiletools.commons.models.FAQItem
import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.gallery.BuildConfig import com.simplemobiletools.gallery.pro.BuildConfig
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.activities.SimpleActivity import com.simplemobiletools.gallery.pro.activities.SimpleActivity
import com.simplemobiletools.gallery.dialogs.PickDirectoryDialog import com.simplemobiletools.gallery.pro.dialogs.PickDirectoryDialog
import com.simplemobiletools.gallery.helpers.NOMEDIA import com.simplemobiletools.gallery.pro.helpers.NOMEDIA
import com.simplemobiletools.gallery.interfaces.MediumDao import com.simplemobiletools.gallery.pro.interfaces.MediumDao
import java.io.File import java.io.File
import java.io.InputStream import java.io.InputStream
import java.io.OutputStream import java.io.OutputStream
@ -208,7 +208,7 @@ fun BaseSimpleActivity.movePathsInRecycleBin(paths: ArrayList<String>, mediumDao
var pathsCnt = paths.size var pathsCnt = paths.size
paths.forEach { paths.forEach {
val file = File(it) val file = File(it)
val internalFile = File(filesDir.absolutePath, it) val internalFile = File(recycleBinPath, it)
try { try {
if (file.copyRecursively(internalFile, true)) { if (file.copyRecursively(internalFile, true)) {
mediumDao.updateDeleted(it, System.currentTimeMillis()) mediumDao.updateDeleted(it, System.currentTimeMillis())
@ -229,7 +229,7 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList<String>, mediumDa
Thread { Thread {
paths.forEach { paths.forEach {
val source = it val source = it
val destination = it.removePrefix(filesDir.absolutePath) val destination = it.removePrefix(recycleBinPath)
var inputStream: InputStream? = null var inputStream: InputStream? = null
var out: OutputStream? = null var out: OutputStream? = null
@ -256,7 +256,7 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList<String>, mediumDa
fun BaseSimpleActivity.emptyTheRecycleBin(callback: (() -> Unit)? = null) { fun BaseSimpleActivity.emptyTheRecycleBin(callback: (() -> Unit)? = null) {
Thread { Thread {
filesDir.deleteRecursively() recycleBin.deleteRecursively()
galleryDB.MediumDao().clearRecycleBin() galleryDB.MediumDao().clearRecycleBin()
galleryDB.DirectoryDao().deleteRecycleBin() galleryDB.DirectoryDao().deleteRecycleBin()
toast(R.string.recycle_bin_emptied) toast(R.string.recycle_bin_emptied)

View file

@ -1,7 +1,7 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
fun ArrayList<Medium>.getDirMediaTypes(): Int { fun ArrayList<Medium>.getDirMediaTypes(): Int {
var types = 0 var types = 0

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
@ -18,18 +18,18 @@ import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.activities.SettingsActivity import com.simplemobiletools.gallery.pro.activities.SettingsActivity
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask import com.simplemobiletools.gallery.pro.asynctasks.GetMediaAsynctask
import com.simplemobiletools.gallery.databases.GalleryDatabase import com.simplemobiletools.gallery.pro.databases.GalleryDatabase
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.interfaces.DirectoryDao import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
import com.simplemobiletools.gallery.interfaces.MediumDao import com.simplemobiletools.gallery.pro.interfaces.MediumDao
import com.simplemobiletools.gallery.models.Directory import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.models.ThumbnailItem import com.simplemobiletools.gallery.pro.models.ThumbnailItem
import com.simplemobiletools.gallery.svg.SvgSoftwareLayerSetter import com.simplemobiletools.gallery.pro.svg.SvgSoftwareLayerSetter
import com.simplemobiletools.gallery.views.MySquareImageView import com.simplemobiletools.gallery.pro.views.MySquareImageView
import pl.droidsonroids.gif.GifDrawable import pl.droidsonroids.gif.GifDrawable
import java.io.File import java.io.File
@ -104,6 +104,10 @@ val Context.config: Config get() = Config.newInstance(applicationContext)
val Context.galleryDB: GalleryDatabase get() = GalleryDatabase.getInstance(applicationContext) val Context.galleryDB: GalleryDatabase get() = GalleryDatabase.getInstance(applicationContext)
val Context.recycleBin: File get() = filesDir
val Context.recycleBinPath: String get() = filesDir.absolutePath
fun Context.movePinnedDirectoriesToFront(dirs: ArrayList<Directory>): ArrayList<Directory> { fun Context.movePinnedDirectoriesToFront(dirs: ArrayList<Directory>): ArrayList<Directory> {
val foundFolders = ArrayList<Directory>() val foundFolders = ArrayList<Directory>()
val pinnedFolders = config.pinnedFolders val pinnedFolders = config.pinnedFolders
@ -430,7 +434,6 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
val grouped = mediaFetcher.groupMedia(media, pathToUse) val grouped = mediaFetcher.groupMedia(media, pathToUse)
callback(grouped.clone() as ArrayList<ThumbnailItem>) callback(grouped.clone() as ArrayList<ThumbnailItem>)
val recycleBinPath = filesDir.absolutePath
val mediaToDelete = ArrayList<Medium>() val mediaToDelete = ArrayList<Medium>()
media.filter { !getDoesFilePathExist(it.path) }.forEach { media.filter { !getDoesFilePathExist(it.path) }.forEach {
if (it.path.startsWith(recycleBinPath)) { if (it.path.startsWith(recycleBinPath)) {
@ -470,7 +473,7 @@ fun Context.getFavoritePaths() = galleryDB.MediumDao().getFavoritePaths() as Arr
fun Context.getUpdatedDeletedMedia(mediumDao: MediumDao): ArrayList<Medium> { fun Context.getUpdatedDeletedMedia(mediumDao: MediumDao): ArrayList<Medium> {
val media = mediumDao.getDeletedMedia() as ArrayList<Medium> val media = mediumDao.getDeletedMedia() as ArrayList<Medium>
media.forEach { media.forEach {
it.path = File(filesDir.absolutePath, it.path).toString() it.path = File(recycleBinPath, it.path).toString()
} }
return media return media
} }

View file

@ -1,6 +1,6 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import com.simplemobiletools.gallery.helpers.NOMEDIA import com.simplemobiletools.gallery.pro.helpers.NOMEDIA
import java.io.File import java.io.File
fun File.containsNoMedia() = isDirectory && File(this, NOMEDIA).exists() fun File.containsNoMedia() = isDirectory && File(this, NOMEDIA).exists()

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import android.os.Environment import android.os.Environment
import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.FileDirItem

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import android.content.Context import android.content.Context
import android.content.res.Resources import android.content.res.Resources

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import com.bumptech.glide.signature.ObjectKey import com.bumptech.glide.signature.ObjectKey
import com.simplemobiletools.commons.helpers.OTG_PATH import com.simplemobiletools.commons.helpers.OTG_PATH

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.extensions package com.simplemobiletools.gallery.pro.extensions
import android.os.SystemClock import android.os.SystemClock
import android.view.MotionEvent import android.view.MotionEvent

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.fragments package com.simplemobiletools.gallery.pro.fragments
import android.content.Intent import android.content.Intent
import android.content.res.Configuration import android.content.res.Configuration
@ -28,17 +28,17 @@ import com.davemorrissey.labs.subscaleview.ImageSource
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.OTG_PATH import com.simplemobiletools.commons.helpers.OTG_PATH
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.activities.PanoramaPhotoActivity import com.simplemobiletools.gallery.pro.activities.PanoramaPhotoActivity
import com.simplemobiletools.gallery.activities.PhotoActivity import com.simplemobiletools.gallery.pro.activities.PhotoActivity
import com.simplemobiletools.gallery.activities.ViewPagerActivity import com.simplemobiletools.gallery.pro.activities.ViewPagerActivity
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.MEDIUM import com.simplemobiletools.gallery.pro.helpers.MEDIUM
import com.simplemobiletools.gallery.helpers.PATH import com.simplemobiletools.gallery.pro.helpers.PATH
import com.simplemobiletools.gallery.helpers.PicassoDecoder import com.simplemobiletools.gallery.pro.helpers.PicassoDecoder
import com.simplemobiletools.gallery.helpers.PicassoRegionDecoder import com.simplemobiletools.gallery.pro.helpers.PicassoRegionDecoder
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.svg.SvgSoftwareLayerSetter import com.simplemobiletools.gallery.pro.svg.SvgSoftwareLayerSetter
import com.squareup.picasso.Callback import com.squareup.picasso.Callback
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import it.sephiroth.android.library.exif2.ExifInterface import it.sephiroth.android.library.exif2.ExifInterface
@ -162,6 +162,7 @@ class PhotoFragment : ViewPagerFragment() {
initExtendedDetails() initExtendedDetails()
wasInit = true wasInit = true
checkIfPanorama() checkIfPanorama()
updateInstantSwitchWidths()
return view return view
} }
@ -542,6 +543,7 @@ class PhotoFragment : ViewPagerFragment() {
} }
initExtendedDetails() initExtendedDetails()
updateInstantSwitchWidths()
} }
private fun hideZoomableView() { private fun hideZoomableView() {
@ -557,6 +559,12 @@ class PhotoFragment : ViewPagerFragment() {
listener?.fragmentClicked() listener?.fragmentClicked()
} }
private fun updateInstantSwitchWidths() {
val newWidth = resources.getDimension(R.dimen.instant_change_bar_width) + if (activity?.portrait == false) activity!!.navigationBarWidth else 0
view.instant_prev_item.layoutParams.width = newWidth.toInt()
view.instant_next_item.layoutParams.width = newWidth.toInt()
}
override fun fullscreenToggled(isFullscreen: Boolean) { override fun fullscreenToggled(isFullscreen: Boolean) {
this.isFullscreen = isFullscreen this.isFullscreen = isFullscreen
view.photo_details.apply { view.photo_details.apply {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.fragments package com.simplemobiletools.gallery.pro.fragments
import android.content.Intent import android.content.Intent
import android.content.res.Configuration import android.content.res.Configuration
@ -26,24 +26,27 @@ import com.google.android.exoplayer2.upstream.DataSpec
import com.google.android.exoplayer2.upstream.FileDataSource import com.google.android.exoplayer2.upstream.FileDataSource
import com.google.android.exoplayer2.video.VideoListener import com.google.android.exoplayer2.video.VideoListener
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.activities.PanoramaVideoActivity import com.simplemobiletools.gallery.pro.activities.PanoramaVideoActivity
import com.simplemobiletools.gallery.activities.VideoActivity import com.simplemobiletools.gallery.pro.activities.VideoActivity
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.views.MediaSideScroll import com.simplemobiletools.gallery.pro.views.MediaSideScroll
import kotlinx.android.synthetic.main.bottom_video_time_holder.view.* import kotlinx.android.synthetic.main.bottom_video_time_holder.view.*
import kotlinx.android.synthetic.main.pager_video_item.view.* import kotlinx.android.synthetic.main.pager_video_item.view.*
import java.io.File import java.io.File
import java.io.FileInputStream
import java.nio.ByteBuffer
import java.nio.channels.FileChannel
class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, SeekBar.OnSeekBarChangeListener { class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, SeekBar.OnSeekBarChangeListener {
private val PROGRESS = "progress" private val PROGRESS = "progress"
private val FILE_CHANNEL_CONTAINERS = arrayListOf("moov", "trak", "mdia", "minf", "udta", "stbl")
private var mTextureView: TextureView? = null private var mTextureView: TextureView? = null
private var mCurrTimeView: TextView? = null private var mCurrTimeView: TextView? = null
private var mSeekBar: SeekBar? = null private var mSeekBar: SeekBar? = null
private var mView: View? = null
private var mExoPlayer: SimpleExoPlayer? = null private var mExoPlayer: SimpleExoPlayer? = null
private var mVideoSize = Point(0, 0) private var mVideoSize = Point(0, 0)
private var mTimerHandler = Handler() private var mTimerHandler = Handler()
@ -56,6 +59,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private var mWasFragmentInit = false private var mWasFragmentInit = false
private var mIsExoPlayerInitialized = false private var mIsExoPlayerInitialized = false
private var mIsPanorama = false private var mIsPanorama = false
private var mWasVideoStarted = false
private var mCurrTime = 0 private var mCurrTime = 0
private var mDuration = 0 private var mDuration = 0
@ -63,11 +67,15 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private var mStoredHideExtendedDetails = false private var mStoredHideExtendedDetails = false
private var mStoredBottomActions = true private var mStoredBottomActions = true
private var mStoredExtendedDetails = 0 private var mStoredExtendedDetails = 0
private var mStoredRememberLastVideoPosition = false
private var mStoredLastVideoPath = ""
private var mStoredLastVideoPosition = 0
private lateinit var mTimeHolder: View private lateinit var mTimeHolder: View
private lateinit var mBrightnessSideScroll: MediaSideScroll private lateinit var mBrightnessSideScroll: MediaSideScroll
private lateinit var mVolumeSideScroll: MediaSideScroll private lateinit var mVolumeSideScroll: MediaSideScroll
lateinit var mView: View
lateinit var medium: Medium lateinit var medium: Medium
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
@ -103,7 +111,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
storeStateVariables() storeStateVariables()
medium = arguments!!.getSerializable(MEDIUM) as Medium medium = arguments!!.getSerializable(MEDIUM) as Medium
Glide.with(context!!).load(medium.path).into(mView!!.video_preview) Glide.with(context!!).load(medium.path).into(mView.video_preview)
// setMenuVisibility is not called at VideoActivity (third party intent) // setMenuVisibility is not called at VideoActivity (third party intent)
if (!mIsFragmentVisible && activity is VideoActivity) { if (!mIsFragmentVisible && activity is VideoActivity) {
@ -112,12 +120,13 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
mIsFullscreen = activity!!.window.decorView.systemUiVisibility and View.SYSTEM_UI_FLAG_FULLSCREEN == View.SYSTEM_UI_FLAG_FULLSCREEN mIsFullscreen = activity!!.window.decorView.systemUiVisibility and View.SYSTEM_UI_FLAG_FULLSCREEN == View.SYSTEM_UI_FLAG_FULLSCREEN
initTimeHolder() initTimeHolder()
checkIfPanorama()
medium.path.getVideoResolution()?.apply { medium.path.getVideoResolution()?.apply {
mVideoSize.x = x mVideoSize.x = x
mVideoSize.y = y mVideoSize.y = y
mIsPanorama = x == y * 2
if (mIsPanorama) { if (mIsPanorama) {
mView!!.apply { mView.apply {
panorama_outline.beVisible() panorama_outline.beVisible()
video_play_outline.beGone() video_play_outline.beGone()
mVolumeSideScroll.beGone() mVolumeSideScroll.beGone()
@ -144,7 +153,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
setVideoSize() setVideoSize()
} }
mView!!.apply { mView.apply {
mBrightnessSideScroll.initialize(activity!!, slide_info, true, container) { x, y -> mBrightnessSideScroll.initialize(activity!!, slide_info, true, container) { x, y ->
video_holder.performClick() video_holder.performClick()
} }
@ -162,17 +171,22 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
} }
setupVideoDuration() setupVideoDuration()
if (mStoredRememberLastVideoPosition) {
setLastVideoSavedPosition()
}
updateInstantSwitchWidths()
return mView return mView
} }
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
activity!!.updateTextColors(mView!!.video_holder) activity!!.updateTextColors(mView.video_holder)
val config = context!!.config val config = context!!.config
val allowVideoGestures = config.allowVideoGestures val allowVideoGestures = config.allowVideoGestures
val allowInstantChange = config.allowInstantChange val allowInstantChange = config.allowInstantChange
mView!!.apply { mView.apply {
video_volume_controller.beVisibleIf(allowVideoGestures && !mIsPanorama) video_volume_controller.beVisibleIf(allowVideoGestures && !mIsPanorama)
video_brightness_controller.beVisibleIf(allowVideoGestures && !mIsPanorama) video_brightness_controller.beVisibleIf(allowVideoGestures && !mIsPanorama)
@ -195,6 +209,10 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
pauseVideo() pauseVideo()
if (mStoredRememberLastVideoPosition && mIsFragmentVisible && mWasVideoStarted) {
saveVideoProgress()
}
storeStateVariables() storeStateVariables()
} }
@ -222,6 +240,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
setVideoSize() setVideoSize()
initTimeHolder() initTimeHolder()
checkExtendedDetails() checkExtendedDetails()
updateInstantSwitchWidths()
} }
private fun storeStateVariables() { private fun storeStateVariables() {
@ -230,6 +249,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
mStoredHideExtendedDetails = hideExtendedDetails mStoredHideExtendedDetails = hideExtendedDetails
mStoredExtendedDetails = extendedDetails mStoredExtendedDetails = extendedDetails
mStoredBottomActions = bottomActions mStoredBottomActions = bottomActions
mStoredRememberLastVideoPosition = rememberLastVideoPosition
mStoredLastVideoPath = lastVideoPath
mStoredLastVideoPosition = lastVideoPosition
} }
} }
@ -237,15 +259,27 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
if (activity == null) if (activity == null)
return return
mView!!.video_play_outline.setOnClickListener { togglePlayPause() } mView.video_play_outline.setOnClickListener { togglePlayPause() }
mTextureView = mView!!.video_surface mTextureView = mView.video_surface
mTextureView!!.setOnClickListener { toggleFullscreen() } mTextureView!!.setOnClickListener { toggleFullscreen() }
mTextureView!!.surfaceTextureListener = this mTextureView!!.surfaceTextureListener = this
checkExtendedDetails() checkExtendedDetails()
} }
private fun saveVideoProgress() {
if (!videoEnded()) {
mStoredLastVideoPosition = mExoPlayer!!.currentPosition.toInt() / 1000
mStoredLastVideoPath = medium.path
}
context!!.config.apply {
lastVideoPosition = mStoredLastVideoPosition
lastVideoPath = mStoredLastVideoPath
}
}
private fun initExoPlayer() { private fun initExoPlayer() {
val isContentUri = medium.path.startsWith("content://") val isContentUri = medium.path.startsWith("content://")
val uri = if (isContentUri) Uri.parse(medium.path) else Uri.fromFile(File(medium.path)) val uri = if (isContentUri) Uri.parse(medium.path) else Uri.fromFile(File(medium.path))
@ -309,15 +343,20 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
listener?.fragmentClicked() listener?.fragmentClicked()
} }
private fun setLastVideoSavedPosition() {
if (mStoredLastVideoPath == medium.path && mStoredLastVideoPosition > 0) {
setPosition(mStoredLastVideoPosition)
}
}
private fun initTimeHolder() { private fun initTimeHolder() {
val res = resources
val left = 0 val left = 0
val top = 0 val top = 0
var right = 0 var right = 0
var bottom = 0 var bottom = 0
if (hasNavBar()) { if (hasNavBar()) {
if (res.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) { if (resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
bottom += context!!.navigationBarHeight bottom += context!!.navigationBarHeight
} else { } else {
right += context!!.navigationBarWidth right += context!!.navigationBarWidth
@ -331,7 +370,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
mTimeHolder.setPadding(left, top, right, bottom) mTimeHolder.setPadding(left, top, right, bottom)
mSeekBar = mView!!.video_seekbar mSeekBar = mView.video_seekbar
mSeekBar!!.setOnSeekBarChangeListener(this) mSeekBar!!.setOnSeekBarChangeListener(this)
mTimeHolder.beInvisibleIf(mIsFullscreen) mTimeHolder.beInvisibleIf(mIsFullscreen)
} }
@ -356,7 +395,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private fun setupTimeHolder() { private fun setupTimeHolder() {
mSeekBar!!.max = mDuration mSeekBar!!.max = mDuration
mView!!.video_duration.text = mDuration.getFormattedDuration() mView.video_duration.text = mDuration.getFormattedDuration()
setupTimer() setupTimer()
} }
@ -417,21 +456,36 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
return return
} }
if (mView!!.video_preview.isVisible()) { if (mView.video_preview.isVisible()) {
mView!!.video_preview.beGone() mView.video_preview.beGone()
initExoPlayer() initExoPlayer()
} }
if (videoEnded()) { val wasEnded = videoEnded()
setProgress(0) if (wasEnded) {
setPosition(0)
} }
if (mStoredRememberLastVideoPosition) {
setLastVideoSavedPosition()
clearLastVideoSavedProgress()
}
if (!wasEnded || context?.config?.loopVideos == false) {
mView.video_play_outline.setImageResource(R.drawable.ic_pause)
mView.video_play_outline.alpha = PLAY_PAUSE_VISIBLE_ALPHA
}
schedulePlayPauseFadeOut()
mWasVideoStarted = true
mIsPlaying = true mIsPlaying = true
mExoPlayer?.playWhenReady = true mExoPlayer?.playWhenReady = true
mView!!.video_play_outline.setImageResource(R.drawable.ic_pause)
mView!!.video_play_outline.alpha = PLAY_PAUSE_VISIBLE_ALPHA
activity!!.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) activity!!.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
schedulePlayPauseFadeOut() }
private fun clearLastVideoSavedProgress() {
mStoredLastVideoPosition = 0
mStoredLastVideoPath = ""
} }
private fun pauseVideo() { private fun pauseVideo() {
@ -444,22 +498,26 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
mExoPlayer?.playWhenReady = false mExoPlayer?.playWhenReady = false
} }
mView?.video_play_outline?.setImageResource(R.drawable.ic_play) mView.video_play_outline?.setImageResource(R.drawable.ic_play)
mView?.video_play_outline?.alpha = PLAY_PAUSE_VISIBLE_ALPHA mView.video_play_outline?.alpha = PLAY_PAUSE_VISIBLE_ALPHA
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
schedulePlayPauseFadeOut() schedulePlayPauseFadeOut()
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
} }
private fun schedulePlayPauseFadeOut() { private fun schedulePlayPauseFadeOut() {
mHidePlayPauseHandler.removeCallbacksAndMessages(null) mHidePlayPauseHandler.removeCallbacksAndMessages(null)
mHidePlayPauseHandler.postDelayed({ mHidePlayPauseHandler.postDelayed({
mView!!.video_play_outline.animate().alpha(0f).start() mView.video_play_outline.animate().alpha(0f).start()
}, HIDE_PLAY_PAUSE_DELAY) }, HIDE_PLAY_PAUSE_DELAY)
} }
private fun videoEnded() = mExoPlayer?.currentPosition ?: 0 >= mExoPlayer?.duration ?: 0 private fun videoEnded(): Boolean {
val currentPos = mExoPlayer?.currentPosition ?: 0
val duration = mExoPlayer?.duration ?: 0
return currentPos != 0L && currentPos >= duration
}
private fun setProgress(seconds: Int) { private fun setPosition(seconds: Int) {
mExoPlayer?.seekTo(seconds * 1000L) mExoPlayer?.seekTo(seconds * 1000L)
mSeekBar!!.progress = seconds mSeekBar!!.progress = seconds
mCurrTimeView!!.text = seconds.getFormattedDuration() mCurrTimeView!!.text = seconds.getFormattedDuration()
@ -474,14 +532,14 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
} }
setupTimeHolder() setupTimeHolder()
setProgress(0) setPosition(0)
} }
private fun videoPrepared() { private fun videoPrepared() {
if (mDuration == 0) { if (mDuration == 0) {
mDuration = (mExoPlayer!!.duration / 1000).toInt() mDuration = (mExoPlayer!!.duration / 1000).toInt()
setupTimeHolder() setupTimeHolder()
setProgress(mCurrTime) setPosition(mCurrTime)
if (mIsFragmentVisible && (context!!.config.autoplayVideos)) { if (mIsFragmentVisible && (context!!.config.autoplayVideos)) {
playVideo() playVideo()
@ -564,7 +622,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private fun checkExtendedDetails() { private fun checkExtendedDetails() {
if (context!!.config.showExtendedDetails) { if (context!!.config.showExtendedDetails) {
mView!!.video_details.apply { mView.video_details.apply {
beInvisible() // make it invisible so we can measure it, but not show yet beInvisible() // make it invisible so we can measure it, but not show yet
text = getMediumExtendedDetails(medium) text = getMediumExtendedDetails(medium)
onGlobalLayout { onGlobalLayout {
@ -579,7 +637,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
} }
} }
} else { } else {
mView!!.video_details.beGone() mView.video_details.beGone()
} }
} }
@ -593,7 +651,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
val newProgress = if (forward) curr + twoPercents else curr - twoPercents val newProgress = if (forward) curr + twoPercents else curr - twoPercents
val roundProgress = Math.round(newProgress / 1000f) val roundProgress = Math.round(newProgress / 1000f)
val limitedProgress = Math.max(Math.min(mExoPlayer!!.duration.toInt(), roundProgress), 0) val limitedProgress = Math.max(Math.min(mExoPlayer!!.duration.toInt(), roundProgress), 0)
setProgress(limitedProgress) setPosition(limitedProgress)
if (!mIsPlaying) { if (!mIsPlaying) {
togglePlayPause() togglePlayPause()
} }
@ -601,7 +659,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) { override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
if (mExoPlayer != null && fromUser) { if (mExoPlayer != null && fromUser) {
setProgress(progress) setPosition(progress)
} }
} }
@ -614,6 +672,11 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
} }
override fun onStopTrackingTouch(seekBar: SeekBar) { override fun onStopTrackingTouch(seekBar: SeekBar) {
if (mIsPanorama) {
openPanorama()
return
}
if (mExoPlayer == null) if (mExoPlayer == null)
return return
@ -626,6 +689,70 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
mIsDragged = false mIsDragged = false
} }
private fun checkIfPanorama() {
try {
val fis = FileInputStream(File(medium.path))
parseFileChannel(fis.channel, 0, 0, 0)
} catch (ignored: Exception) {
} catch (ignored: OutOfMemoryError) {
}
}
// based on https://github.com/sannies/mp4parser/blob/master/examples/src/main/java/com/google/code/mp4parser/example/PrintStructure.java
private fun parseFileChannel(fc: FileChannel, level: Int, start: Long, end: Long) {
try {
var iteration = 0
var currEnd = end
fc.position(start)
if (currEnd <= 0) {
currEnd = start + fc.size()
}
while (currEnd - fc.position() > 8) {
// just a check to avoid deadloop at some videos
if (iteration++ > 50) {
return
}
val begin = fc.position()
val byteBuffer = ByteBuffer.allocate(8)
fc.read(byteBuffer)
byteBuffer.rewind()
val size = IsoTypeReader.readUInt32(byteBuffer)
val type = IsoTypeReader.read4cc(byteBuffer)
val newEnd = begin + size
if (type == "uuid") {
val fis = FileInputStream(File(medium.path))
fis.skip(begin)
val sb = StringBuilder()
val buffer = ByteArray(1024)
while (true) {
val n = fis.read(buffer)
if (n != -1) {
sb.append(String(buffer, 0, n))
} else {
break
}
}
val xmlString = sb.toString().toLowerCase()
mIsPanorama = xmlString.contains("gspherical:projectiontype>equirectangular") ||
xmlString.contains("gspherical:projectiontype=\"equirectangular\"")
return
}
if (FILE_CHANNEL_CONTAINERS.contains(type)) {
parseFileChannel(fc, level + 1, begin + 8, newEnd)
}
fc.position(newEnd)
}
} catch (ignored: Exception) {
}
}
private fun openPanorama() { private fun openPanorama() {
Intent(context, PanoramaVideoActivity::class.java).apply { Intent(context, PanoramaVideoActivity::class.java).apply {
putExtra(PATH, medium.path) putExtra(PATH, medium.path)
@ -633,10 +760,16 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
} }
} }
private fun updateInstantSwitchWidths() {
val newWidth = resources.getDimension(R.dimen.instant_change_bar_width) + if (activity?.portrait == false) activity!!.navigationBarWidth else 0
mView.instant_prev_item.layoutParams.width = newWidth.toInt()
mView.instant_next_item.layoutParams.width = newWidth.toInt()
}
override fun fullscreenToggled(isFullscreen: Boolean) { override fun fullscreenToggled(isFullscreen: Boolean) {
mIsFullscreen = isFullscreen mIsFullscreen = isFullscreen
checkFullscreen() checkFullscreen()
mView!!.video_details.apply { mView.video_details.apply {
if (mStoredShowExtendedDetails && isVisible()) { if (mStoredShowExtendedDetails && isVisible()) {
animate().y(getExtendedDetailsY(height)) animate().y(getExtendedDetailsY(height))

View file

@ -1,12 +1,12 @@
package com.simplemobiletools.gallery.fragments package com.simplemobiletools.gallery.pro.fragments
import android.view.MotionEvent import android.view.MotionEvent
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.OTG_PATH import com.simplemobiletools.commons.helpers.OTG_PATH
import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import java.io.File import java.io.File
abstract class ViewPagerFragment : Fragment() { abstract class ViewPagerFragment : Fragment() {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.helpers package com.simplemobiletools.gallery.pro.helpers
import android.content.Context import android.content.Context
import android.content.res.Configuration import android.content.res.Configuration
@ -8,8 +8,8 @@ import com.google.gson.reflect.TypeToken
import com.simplemobiletools.commons.helpers.BaseConfig import com.simplemobiletools.commons.helpers.BaseConfig
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
import com.simplemobiletools.commons.helpers.SORT_DESCENDING import com.simplemobiletools.commons.helpers.SORT_DESCENDING
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.models.AlbumCover import com.simplemobiletools.gallery.pro.models.AlbumCover
import java.util.* import java.util.*
class Config(context: Context) : BaseConfig(context) { class Config(context: Context) : BaseConfig(context) {
@ -117,17 +117,9 @@ class Config(context: Context) : BaseConfig(context) {
} }
var excludedFolders: MutableSet<String> var excludedFolders: MutableSet<String>
get() = prefs.getStringSet(EXCLUDED_FOLDERS, getDataFolder()) get() = prefs.getStringSet(EXCLUDED_FOLDERS, HashSet<String>())
set(excludedFolders) = prefs.edit().remove(EXCLUDED_FOLDERS).putStringSet(EXCLUDED_FOLDERS, excludedFolders).apply() set(excludedFolders) = prefs.edit().remove(EXCLUDED_FOLDERS).putStringSet(EXCLUDED_FOLDERS, excludedFolders).apply()
private fun getDataFolder(): Set<String> {
val folders = HashSet<String>()
val dataFolder = context.externalCacheDir?.parentFile?.parent?.trimEnd('/') ?: ""
if (dataFolder.endsWith("data"))
folders.add(dataFolder)
return folders
}
fun addIncludedFolder(path: String) { fun addIncludedFolder(path: String) {
val currIncludedFolders = HashSet<String>(includedFolders) val currIncludedFolders = HashSet<String>(includedFolders)
currIncludedFolders.add(path) currIncludedFolders.add(path)
@ -365,6 +357,18 @@ class Config(context: Context) : BaseConfig(context) {
get() = prefs.getBoolean(BOTTOM_ACTIONS, true) get() = prefs.getBoolean(BOTTOM_ACTIONS, true)
set(bottomActions) = prefs.edit().putBoolean(BOTTOM_ACTIONS, bottomActions).apply() set(bottomActions) = prefs.edit().putBoolean(BOTTOM_ACTIONS, bottomActions).apply()
var rememberLastVideoPosition: Boolean
get() = prefs.getBoolean(REMEMBER_LAST_VIDEO_POSITION, false)
set(rememberLastVideoPosition) = prefs.edit().putBoolean(REMEMBER_LAST_VIDEO_POSITION, rememberLastVideoPosition).apply()
var lastVideoPath: String
get() = prefs.getString(LAST_VIDEO_PATH, "")
set(lastVideoPath) = prefs.edit().putString(LAST_VIDEO_PATH, lastVideoPath).apply()
var lastVideoPosition: Int
get() = prefs.getInt(LAST_VIDEO_POSITION, 0)
set(lastVideoPosition) = prefs.edit().putInt(LAST_VIDEO_POSITION, lastVideoPosition).apply()
var visibleBottomActions: Int var visibleBottomActions: Int
get() = prefs.getInt(VISIBLE_BOTTOM_ACTIONS, DEFAULT_BOTTOM_ACTIONS) get() = prefs.getInt(VISIBLE_BOTTOM_ACTIONS, DEFAULT_BOTTOM_ACTIONS)
set(visibleBottomActions) = prefs.edit().putInt(VISIBLE_BOTTOM_ACTIONS, visibleBottomActions).apply() set(visibleBottomActions) = prefs.edit().putInt(VISIBLE_BOTTOM_ACTIONS, visibleBottomActions).apply()

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.helpers package com.simplemobiletools.gallery.pro.helpers
import com.simplemobiletools.commons.helpers.MONTH_SECONDS import com.simplemobiletools.commons.helpers.MONTH_SECONDS
@ -10,6 +10,7 @@ const val SHOW_HIDDEN_MEDIA = "show_hidden_media"
const val TEMPORARILY_SHOW_HIDDEN = "temporarily_show_hidden" const val TEMPORARILY_SHOW_HIDDEN = "temporarily_show_hidden"
const val IS_THIRD_PARTY_INTENT = "is_third_party_intent" const val IS_THIRD_PARTY_INTENT = "is_third_party_intent"
const val AUTOPLAY_VIDEOS = "autoplay_videos" const val AUTOPLAY_VIDEOS = "autoplay_videos"
const val REMEMBER_LAST_VIDEO_POSITION = "remember_last_video_position"
const val LOOP_VIDEOS = "loop_videos" const val LOOP_VIDEOS = "loop_videos"
const val ANIMATE_GIFS = "animate_gifs" const val ANIMATE_GIFS = "animate_gifs"
const val MAX_BRIGHTNESS = "max_brightness" const val MAX_BRIGHTNESS = "max_brightness"
@ -51,6 +52,8 @@ const val LAST_FILEPICKER_PATH = "last_filepicker_path"
const val WAS_OTG_HANDLED = "was_otg_handled" const val WAS_OTG_HANDLED = "was_otg_handled"
const val TEMP_SKIP_DELETE_CONFIRMATION = "temp_skip_delete_confirmation" const val TEMP_SKIP_DELETE_CONFIRMATION = "temp_skip_delete_confirmation"
const val BOTTOM_ACTIONS = "bottom_actions" const val BOTTOM_ACTIONS = "bottom_actions"
const val LAST_VIDEO_PATH = "last_video_path"
const val LAST_VIDEO_POSITION = "last_video_position"
const val VISIBLE_BOTTOM_ACTIONS = "visible_bottom_actions" const val VISIBLE_BOTTOM_ACTIONS = "visible_bottom_actions"
const val WERE_FAVORITES_PINNED = "were_favorites_pinned" const val WERE_FAVORITES_PINNED = "were_favorites_pinned"
const val WAS_RECYCLE_BIN_PINNED = "was_recycle_bin_pinned" const val WAS_RECYCLE_BIN_PINNED = "was_recycle_bin_pinned"
@ -76,6 +79,7 @@ const val SLIDESHOW_MOVE_BACKWARDS = "slideshow_move_backwards"
const val SLIDESHOW_LOOP = "loop_slideshow" const val SLIDESHOW_LOOP = "loop_slideshow"
const val SLIDESHOW_DEFAULT_INTERVAL = 5 const val SLIDESHOW_DEFAULT_INTERVAL = 5
const val SLIDESHOW_SCROLL_DURATION = 500L const val SLIDESHOW_SCROLL_DURATION = 500L
const val SLIDESHOW_START_ON_ENTER= "slideshow_start_on_enter"
const val NOMEDIA = ".nomedia" const val NOMEDIA = ".nomedia"
const val FAVORITES = "favorites" const val FAVORITES = "favorites"

View file

@ -1,7 +1,7 @@
package com.simplemobiletools.gallery.helpers package com.simplemobiletools.gallery.pro.helpers
import android.graphics.Bitmap import android.graphics.Bitmap
import com.simplemobiletools.gallery.models.FilterItem import com.simplemobiletools.gallery.pro.models.FilterItem
import java.util.* import java.util.*
class FilterThumbnailsManager { class FilterThumbnailsManager {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.helpers package com.simplemobiletools.gallery.pro.helpers
import android.graphics.Bitmap import android.graphics.Bitmap
import android.graphics.Matrix import android.graphics.Matrix

View file

@ -0,0 +1,27 @@
package com.simplemobiletools.gallery.pro.helpers
import java.io.UnsupportedEncodingException
import java.nio.ByteBuffer
import java.nio.charset.Charset
// file taken from the https://github.com/sannies/mp4parser project, used at determining if a video is a panoramic one
object IsoTypeReader {
fun readUInt32(bb: ByteBuffer): Long {
var i = bb.int.toLong()
if (i < 0) {
i += 1L shl 32
}
return i
}
fun read4cc(bb: ByteBuffer): String? {
val codeBytes = ByteArray(4)
bb.get(codeBytes)
return try {
String(codeBytes, Charset.forName("ISO-8859-1"))
} catch (e: UnsupportedEncodingException) {
null
}
}
}

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.helpers package com.simplemobiletools.gallery.pro.helpers
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
@ -7,11 +7,11 @@ import android.provider.MediaStore
import android.text.format.DateFormat import android.text.format.DateFormat
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.models.ThumbnailItem import com.simplemobiletools.gallery.pro.models.ThumbnailItem
import com.simplemobiletools.gallery.models.ThumbnailSection import com.simplemobiletools.gallery.pro.models.ThumbnailSection
import java.io.File import java.io.File
import java.util.* import java.util.*

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.helpers package com.simplemobiletools.gallery.pro.helpers
import android.content.Context import android.content.Context
import android.graphics.Bitmap import android.graphics.Bitmap

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.helpers package com.simplemobiletools.gallery.pro.helpers
import android.content.Context import android.content.Context
import android.graphics.* import android.graphics.*

View file

@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.interfaces package com.simplemobiletools.gallery.pro.interfaces
import androidx.room.Dao import androidx.room.Dao
import androidx.room.Insert import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.Query import androidx.room.Query
import com.simplemobiletools.gallery.helpers.RECYCLE_BIN import com.simplemobiletools.gallery.pro.helpers.RECYCLE_BIN
import com.simplemobiletools.gallery.models.Directory import com.simplemobiletools.gallery.pro.models.Directory
@Dao @Dao
interface DirectoryDao { interface DirectoryDao {

View file

@ -1,6 +1,6 @@
package com.simplemobiletools.gallery.interfaces package com.simplemobiletools.gallery.pro.interfaces
import com.simplemobiletools.gallery.models.Directory import com.simplemobiletools.gallery.pro.models.Directory
import java.io.File import java.io.File
interface DirectoryOperationsListener { interface DirectoryOperationsListener {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.interfaces package com.simplemobiletools.gallery.pro.interfaces
import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.models.FileDirItem

View file

@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.interfaces package com.simplemobiletools.gallery.pro.interfaces
import androidx.room.Dao import androidx.room.Dao
import androidx.room.Delete import androidx.room.Delete
import androidx.room.Insert import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.Query import androidx.room.Query
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
@Dao @Dao
interface MediumDao { interface MediumDao {

View file

@ -1,3 +1,3 @@
package com.simplemobiletools.gallery.models package com.simplemobiletools.gallery.pro.models
data class AlbumCover(val path: String, val tmb: String) data class AlbumCover(val path: String, val tmb: String)

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.models package com.simplemobiletools.gallery.pro.models
import androidx.room.ColumnInfo import androidx.room.ColumnInfo
import androidx.room.Entity import androidx.room.Entity
@ -10,11 +10,11 @@ import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
import com.simplemobiletools.commons.helpers.SORT_BY_NAME import com.simplemobiletools.commons.helpers.SORT_BY_NAME
import com.simplemobiletools.commons.helpers.SORT_BY_PATH import com.simplemobiletools.commons.helpers.SORT_BY_PATH
import com.simplemobiletools.commons.helpers.SORT_BY_SIZE import com.simplemobiletools.commons.helpers.SORT_BY_SIZE
import com.simplemobiletools.gallery.helpers.FAVORITES import com.simplemobiletools.gallery.pro.helpers.FAVORITES
import com.simplemobiletools.gallery.helpers.RECYCLE_BIN import com.simplemobiletools.gallery.pro.helpers.RECYCLE_BIN
import java.io.Serializable import java.io.Serializable
@Entity(tableName = "directories", indices = [Index(value = "path", unique = true)]) @Entity(tableName = "directories", indices = [Index(value = ["path"], unique = true)])
data class Directory( data class Directory(
@PrimaryKey(autoGenerate = true) var id: Long?, @PrimaryKey(autoGenerate = true) var id: Long?,
@ColumnInfo(name = "path") var path: String, @ColumnInfo(name = "path") var path: String,

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.models package com.simplemobiletools.gallery.pro.models
import android.graphics.Bitmap import android.graphics.Bitmap
import com.zomato.photofilters.imageprocessors.Filter import com.zomato.photofilters.imageprocessors.Filter

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.models package com.simplemobiletools.gallery.pro.models
import androidx.room.ColumnInfo import androidx.room.ColumnInfo
import androidx.room.Entity import androidx.room.Entity
@ -11,11 +11,11 @@ import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
import com.simplemobiletools.commons.helpers.SORT_BY_NAME import com.simplemobiletools.commons.helpers.SORT_BY_NAME
import com.simplemobiletools.commons.helpers.SORT_BY_PATH import com.simplemobiletools.commons.helpers.SORT_BY_PATH
import com.simplemobiletools.commons.helpers.SORT_BY_SIZE import com.simplemobiletools.commons.helpers.SORT_BY_SIZE
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import java.io.Serializable import java.io.Serializable
import java.util.* import java.util.*
@Entity(tableName = "media", indices = [(Index(value = "full_path", unique = true))]) @Entity(tableName = "media", indices = [(Index(value = ["full_path"], unique = true))])
data class Medium( data class Medium(
@PrimaryKey(autoGenerate = true) var id: Long?, @PrimaryKey(autoGenerate = true) var id: Long?,
@ColumnInfo(name = "filename") var name: String, @ColumnInfo(name = "filename") var name: String,

View file

@ -0,0 +1,3 @@
package com.simplemobiletools.gallery.pro.models
open class ThumbnailItem

View file

@ -1,3 +1,3 @@
package com.simplemobiletools.gallery.models package com.simplemobiletools.gallery.pro.models
data class ThumbnailSection(val title: String) : ThumbnailItem() data class ThumbnailSection(val title: String) : ThumbnailItem()

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.objects package com.simplemobiletools.gallery.pro.objects
import java.util.concurrent.Executors import java.util.concurrent.Executors

View file

@ -1,13 +1,13 @@
package com.simplemobiletools.gallery.receivers package com.simplemobiletools.gallery.pro.receivers
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.REFRESH_PATH import com.simplemobiletools.commons.helpers.REFRESH_PATH
import com.simplemobiletools.gallery.extensions.galleryDB import com.simplemobiletools.gallery.pro.extensions.galleryDB
import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.pro.models.Medium
import java.io.File import java.io.File
class RefreshMediaReceiver : BroadcastReceiver() { class RefreshMediaReceiver : BroadcastReceiver() {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.svg package com.simplemobiletools.gallery.pro.svg
import com.bumptech.glide.load.Options import com.bumptech.glide.load.Options
import com.bumptech.glide.load.ResourceDecoder import com.bumptech.glide.load.ResourceDecoder

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.svg package com.simplemobiletools.gallery.pro.svg
import android.graphics.drawable.PictureDrawable import android.graphics.drawable.PictureDrawable
import com.bumptech.glide.load.Options import com.bumptech.glide.load.Options

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.svg package com.simplemobiletools.gallery.pro.svg
import android.content.Context import android.content.Context
import android.graphics.drawable.PictureDrawable import android.graphics.drawable.PictureDrawable

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.svg package com.simplemobiletools.gallery.pro.svg
import android.graphics.drawable.PictureDrawable import android.graphics.drawable.PictureDrawable
import android.widget.ImageView import android.widget.ImageView

View file

@ -1,12 +1,12 @@
package com.simplemobiletools.gallery.views package com.simplemobiletools.gallery.pro.views
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.view.MotionEvent import android.view.MotionEvent
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.RelativeLayout import android.widget.RelativeLayout
import com.simplemobiletools.gallery.helpers.CLICK_MAX_DURATION import com.simplemobiletools.gallery.pro.helpers.CLICK_MAX_DURATION
import com.simplemobiletools.gallery.helpers.DRAG_THRESHOLD import com.simplemobiletools.gallery.pro.helpers.DRAG_THRESHOLD
// handle only one finger clicks, pass other events to the parent view and ignore it when received again // handle only one finger clicks, pass other events to the parent view and ignore it when received again
class InstantItemSwitch(context: Context, attrs: AttributeSet) : RelativeLayout(context, attrs) { class InstantItemSwitch(context: Context, attrs: AttributeSet) : RelativeLayout(context, attrs) {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.views package com.simplemobiletools.gallery.pro.views
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
@ -10,11 +10,11 @@ import android.view.MotionEvent
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.RelativeLayout import android.widget.RelativeLayout
import android.widget.TextView import android.widget.TextView
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.activities.ViewPagerActivity import com.simplemobiletools.gallery.pro.activities.ViewPagerActivity
import com.simplemobiletools.gallery.extensions.audioManager import com.simplemobiletools.gallery.pro.extensions.audioManager
import com.simplemobiletools.gallery.helpers.CLICK_MAX_DURATION import com.simplemobiletools.gallery.pro.helpers.CLICK_MAX_DURATION
import com.simplemobiletools.gallery.helpers.DRAG_THRESHOLD import com.simplemobiletools.gallery.pro.helpers.DRAG_THRESHOLD
// allow horizontal swipes through the layout, else it can cause glitches at zoomed in images // allow horizontal swipes through the layout, else it can cause glitches at zoomed in images
class MediaSideScroll(context: Context, attrs: AttributeSet) : RelativeLayout(context, attrs) { class MediaSideScroll(context: Context, attrs: AttributeSet) : RelativeLayout(context, attrs) {

View file

@ -1,4 +1,4 @@
package com.simplemobiletools.gallery.views package com.simplemobiletools.gallery.pro.views
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet

View file

@ -12,28 +12,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_purchase_thank_you_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_purchase_thank_you"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingStart="@dimen/medium_margin"
android:paddingLeft="@dimen/medium_margin"
android:text="@string/purchase_simple_thank_you"/>
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/settings_customize_colors_holder" android:id="@+id/settings_customize_colors_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -80,30 +58,6 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/settings_avoid_whats_new_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_avoid_whats_new"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:paddingLeft="@dimen/medium_margin"
android:text="@string/avoid_whats_new"
app:switchPadding="@dimen/medium_margin"/>
</RelativeLayout>
<View <View
android:id="@+id/visibility_divider" android:id="@+id/visibility_divider"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -278,6 +232,30 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/settings_remember_last_video_position_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_remember_last_video_position"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:paddingLeft="@dimen/medium_margin"
android:text="@string/remember_last_video_position"
app:switchPadding="@dimen/medium_margin"/>
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/settings_loop_videos_holder" android:id="@+id/settings_loop_videos_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -898,7 +876,7 @@
android:textSize="@dimen/smaller_text_size"/> android:textSize="@dimen/smaller_text_size"/>
<RelativeLayout <RelativeLayout
android:id="@+id/settings_password_protection_holder" android:id="@+id/settings_hidden_item_password_protection_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin" android:layout_marginTop="@dimen/medium_margin"
@ -909,7 +887,7 @@
android:paddingBottom="@dimen/activity_margin"> android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat <com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_password_protection" android:id="@+id/settings_hidden_item_password_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@null"
@ -945,6 +923,30 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/settings_file_deletion_password_protection_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_file_deletion_password_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:paddingLeft="@dimen/medium_margin"
android:text="@string/password_protect_file_deletion"
app:switchPadding="@dimen/medium_margin"/>
</RelativeLayout>
<View <View
android:id="@+id/file_operations_divider" android:id="@+id/file_operations_divider"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -8,7 +8,7 @@
android:focusable="true" android:focusable="true"
android:padding="1px"> android:padding="1px">
<com.simplemobiletools.gallery.views.MySquareImageView <com.simplemobiletools.gallery.pro.views.MySquareImageView
android:id="@+id/dir_thumbnail" android:id="@+id/dir_thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>

View file

@ -9,7 +9,7 @@
android:paddingLeft="@dimen/small_margin" android:paddingLeft="@dimen/small_margin"
android:paddingTop="@dimen/small_margin"> android:paddingTop="@dimen/small_margin">
<com.simplemobiletools.gallery.views.MySquareImageView <com.simplemobiletools.gallery.pro.views.MySquareImageView
android:id="@+id/dir_thumbnail" android:id="@+id/dir_thumbnail"
android:layout_width="@dimen/list_view_folder_thumbnail_size" android:layout_width="@dimen/list_view_folder_thumbnail_size"
android:layout_height="@dimen/list_view_folder_thumbnail_size"/> android:layout_height="@dimen/list_view_folder_thumbnail_size"/>

View file

@ -47,7 +47,7 @@
android:visibility="gone" android:visibility="gone"
tools:text="My image\nAnother line"/> tools:text="My image\nAnother line"/>
<com.simplemobiletools.gallery.views.MediaSideScroll <com.simplemobiletools.gallery.pro.views.MediaSideScroll
android:id="@+id/photo_brightness_controller" android:id="@+id/photo_brightness_controller"
android:layout_width="@dimen/media_side_slider_width" android:layout_width="@dimen/media_side_slider_width"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -71,12 +71,12 @@
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="@dimen/extra_big_text_size"/> android:textSize="@dimen/extra_big_text_size"/>
<com.simplemobiletools.gallery.views.InstantItemSwitch <com.simplemobiletools.gallery.pro.views.InstantItemSwitch
android:id="@+id/instant_prev_item" android:id="@+id/instant_prev_item"
android:layout_width="@dimen/instant_change_bar_width" android:layout_width="@dimen/instant_change_bar_width"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
<com.simplemobiletools.gallery.views.InstantItemSwitch <com.simplemobiletools.gallery.pro.views.InstantItemSwitch
android:id="@+id/instant_next_item" android:id="@+id/instant_next_item"
android:layout_width="@dimen/instant_change_bar_width" android:layout_width="@dimen/instant_change_bar_width"
android:layout_height="match_parent" android:layout_height="match_parent"

View file

@ -17,24 +17,24 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"/> android:layout_centerInParent="true"/>
<com.simplemobiletools.gallery.views.MediaSideScroll <com.simplemobiletools.gallery.pro.views.MediaSideScroll
android:id="@+id/video_volume_controller" android:id="@+id/video_volume_controller"
android:layout_width="@dimen/media_side_slider_width" android:layout_width="@dimen/media_side_slider_width"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"/> android:layout_alignParentRight="true"/>
<com.simplemobiletools.gallery.views.MediaSideScroll <com.simplemobiletools.gallery.pro.views.MediaSideScroll
android:id="@+id/video_brightness_controller" android:id="@+id/video_brightness_controller"
android:layout_width="@dimen/media_side_slider_width" android:layout_width="@dimen/media_side_slider_width"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
<com.simplemobiletools.gallery.views.InstantItemSwitch <com.simplemobiletools.gallery.pro.views.InstantItemSwitch
android:id="@+id/instant_prev_item" android:id="@+id/instant_prev_item"
android:layout_width="@dimen/instant_change_bar_width" android:layout_width="@dimen/instant_change_bar_width"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
<com.simplemobiletools.gallery.views.InstantItemSwitch <com.simplemobiletools.gallery.pro.views.InstantItemSwitch
android:id="@+id/instant_next_item" android:id="@+id/instant_next_item"
android:layout_width="@dimen/instant_change_bar_width" android:layout_width="@dimen/instant_change_bar_width"
android:layout_height="match_parent" android:layout_height="match_parent"

View file

@ -8,7 +8,7 @@
android:focusable="true" android:focusable="true"
android:padding="1px"> android:padding="1px">
<com.simplemobiletools.gallery.views.MySquareImageView <com.simplemobiletools.gallery.pro.views.MySquareImageView
android:id="@+id/medium_thumbnail" android:id="@+id/medium_thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>

View file

@ -9,7 +9,7 @@
android:paddingLeft="@dimen/small_margin" android:paddingLeft="@dimen/small_margin"
android:paddingTop="@dimen/small_margin"> android:paddingTop="@dimen/small_margin">
<com.simplemobiletools.gallery.views.MySquareImageView <com.simplemobiletools.gallery.pro.views.MySquareImageView
android:id="@+id/medium_thumbnail" android:id="@+id/medium_thumbnail"
android:layout_width="@dimen/list_view_folder_thumbnail_size" android:layout_width="@dimen/list_view_folder_thumbnail_size"
android:layout_height="@dimen/list_view_folder_thumbnail_size"/> android:layout_height="@dimen/list_view_folder_thumbnail_size"/>

View file

@ -79,6 +79,10 @@
android:id="@+id/reduce_column_count" android:id="@+id/reduce_column_count"
android:title="@string/reduce_column_count" android:title="@string/reduce_column_count"
app:showAsAction="never"/> app:showAsAction="never"/>
<item
android:id="@+id/slideshow"
android:title="@string/slideshow"
app:showAsAction="never"/>
<item <item
android:id="@+id/settings" android:id="@+id/settings"
android:title="@string/settings" android:title="@string/settings"

View file

@ -137,6 +137,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">تشغيل الفديوهات تلقائيا</string> <string name="autoplay_videos">تشغيل الفديوهات تلقائيا</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">تبديل رؤية اسم الملف</string> <string name="toggle_filename">تبديل رؤية اسم الملف</string>
<string name="loop_videos">حلقة الفيديو</string> <string name="loop_videos">حلقة الفيديو</string>
<string name="animate_gifs">عرض صور GIF المتحركة في الصور المصغرة</string> <string name="animate_gifs">عرض صور GIF المتحركة في الصور المصغرة</string>
@ -212,8 +213,33 @@
<!-- Strings displayed only on Google Playstore. Optional, but good to have --> <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">استوديو لعرض الصور والفيديو بدون اعلانات.</string> <string name="app_short_description">استوديو لعرض الصور والفيديو بدون اعلانات.</string>
<string name="app_long_description">أداة بسيطة تستخدام لعرض الصور ومقاطع الفيديو. يمكن فرز العناصر حسب التاريخ والحجم والاسم على حد سواء تصاعدي أو تنازلي، يمكن تكبير الصور. يتم عرض ملفات الوسائط في أعمدة متعددة اعتمادا على حجم الشاشة، يمكنك تغيير عدد الأعمدة عبر إيماءاة القرص . يمكن إعادة تسميته، مشاركة، حذف، نسخ، نقل. ويمكن أيضا اقتصاص الصور، استدارة، او قلب أو تعيين كخلفية مباشرة من التطبيق. يتم عرض المحتوى أيضا للاستخدام طرف ثالث لمعاينة الصور / الفيديو، إضافة المرفقات في برامج البريد الإلكتروني الخ انه مثالي للاستخدام اليومي. لا يحتوي على إعلانات أو أذونات لا حاجة لها. مفتوح المصدر بشكل كلي ، ويوفر الألوان للتخصيص. هذا التطبيق هو مجرد قطعة واحدة من سلسلة أكبر من التطبيقات. يمكنك العثور على بقيتهم هنا\n <string name="app_long_description">
https://www.simplemobiletools.com</string> A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
It is open source, contains no ads or unnecessary permissions.
Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string>
<!-- <!--
Haven't found some strings? There's more at Haven't found some strings? There's more at

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Play videos automatically</string> <string name="autoplay_videos">Play videos automatically</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Toggle filename visibility</string> <string name="toggle_filename">Toggle filename visibility</string>
<string name="loop_videos">Loop videos</string> <string name="loop_videos">Loop videos</string>
<string name="animate_gifs">Animate GIFs at thumbnails</string> <string name="animate_gifs">Animate GIFs at thumbnails</string>
@ -211,13 +212,29 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Şəkil və videolara baxmaq üçün reklamsız qalereya.</string> <string name="app_short_description">Şəkil və videolara baxmaq üçün reklamsız qalereya.</string>
<string name="app_long_description"> <string name="app_long_description">
A simple tool usable for viewing photos and videos. Items can be sorted by date, size, name both ascending or descending, photos can be zoomed in. Media files are shown in multiple columns depending on the size of the display, you can change the column count by pinch gestures. They can be renamed, shared, deleted, copied, moved. Images can also be cropped, rotated, flipped or set as Wallpaper directly from the app. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
The Gallery is also offered for third party usage for previewing images / videos, adding attachments at email clients etc. It\'s perfect for everyday usage. It is open source, contains no ads or unnecessary permissions.
The fingerprint permission is needed for locking either hidden item visibility, or the whole app. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
Contains no ads or unnecessary permissions. It is fully opensource, provides customizable colors. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Reproduir vídeos automàticament</string> <string name="autoplay_videos">Reproduir vídeos automàticament</string>
<string name="remember_last_video_position">Recordeu la posició de la darrera reproducció de vídeo</string>
<string name="toggle_filename">Canviar la visibilitat del nom d\'arxiu</string> <string name="toggle_filename">Canviar la visibilitat del nom d\'arxiu</string>
<string name="loop_videos">Reproducció continua de vídeos</string> <string name="loop_videos">Reproducció continua de vídeos</string>
<string name="animate_gifs">Animar les miniatures dels GIFs</string> <string name="animate_gifs">Animar les miniatures dels GIFs</string>
@ -211,15 +212,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Una galeria per veure imatges i vídeos sense publicitat.</string> <string name="app_short_description">Una galeria per veure imatges i vídeos sense publicitat.</string>
<string name="app_long_description"> <string name="app_long_description">
Una eina senzilla que es pot fer servir per veure imatges i vídeos. Els elements es poden ordenar per data, mida o nom, tant ascendent com descendent. Es pot fer zoom a les imatges. Els arxius de mitjans es mostren en múltiples columnes depenent de la mida de la pantalla i es pot canviar el número de columnes mitjançant gestos. Permet canviar el nom, compartir, esborrar, i moure. Les imatges també es poden retalla, rotar o utilitzar com a fons de pantalla directament des de l\'aplicació. Una galeria molt personalitzable capaç de mostrar molts tipus d\'imatge i de vídeo diferents, inclosos SVGs, RAWs, fotos panoràmiques i vídeos.
Gallery també s\'ofereix per us de tercers, per visualitzar imatges/vídeos, agregar adjunts a clients de correu, etc. Es perfecta per l\'ús diari. És de codi obert, no conté anuncis ni permisos innecessaris.
El permís d\'empremtes dactilars és necessari per bloquejar la visibilitat d\'elements ocults o tota l\'aplicació. Anem a enumerar algunes de les seves característiques que val la pena esmentar:
1. Cerca
2. Presentació de diapositives
3. Suport per notch
4. Enganxar carpetes a la part superior
5. Filtrar fitxers multimèdia per tipus
6. Paperera de reciclatge per a una fàcil recuperació d\'arxius
7. Bloqueig d\'orientació de la vista en pantalla completa
8. Marcatge dels fitxers preferits per facilitar l\'accés
9. Tancament ràpid de mitjans de pantalla amb gest d\'avall
10. Un editor per modificar imatges i aplicar filtres
11. Protecció per contrasenya per protegir elements ocults o tota l\'aplicació
12. Canviar el número de columnes en miniatura amb gestos o botons de menú
13. Botons inferiors personalitzables a la vista de pantalla completa per a un accés ràpid
14. Mostrar detalls ampliats sobre els suports de pantalla completa amb les propietats del fitxer desitjades
15. Diverses maneres diferents de classificar o agrupar elements, tant ascendents com descendents
16. Ocultació de carpetes (també afecta altres aplicacions), eExclusió de carpetes (afecta només a la Galeria simple)
No conté ni publicitat ni permisos innecessaris. Es totalment Lliure i proporciona colors personalitzables. El permís d\'empremtes dactilars és necessari per bloquejar la visibilitat d\'elements ocults, l\'aplicació sencera o la protecció dels fitxers.
Aquesta aplicació es només una peça d\'una sèrie més gran d\'aplicacions. Pots trobar la resta a https://www.simplemobiletools.com Aquesta aplicació és només una part d\'una sèrie més gran d\'aplicacions. Podeu trobar la resta a https://www.simplemobiletools.com
</string> </string>
<!-- <!--

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Automaticky přehrávat videa</string> <string name="autoplay_videos">Automaticky přehrávat videa</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Přepnout viditelnost názvů souborů</string> <string name="toggle_filename">Přepnout viditelnost názvů souborů</string>
<string name="loop_videos">Přehrávat videa ve smyčce</string> <string name="loop_videos">Přehrávat videa ve smyčce</string>
<string name="animate_gifs">Animovat náhledy souborů GIF</string> <string name="animate_gifs">Animovat náhledy souborů GIF</string>
@ -211,15 +212,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Galerie na prohlížení obrázků a videí bez reklam.</string> <string name="app_short_description">Galerie na prohlížení obrázků a videí bez reklam.</string>
<string name="app_long_description"> <string name="app_long_description">
Jednoduchý nástroj použitelný na prohlížení obrázků a videí. Položky mohou být seřazeny podle data, velikosti či názvu vzestupně i sestupně. Obrázky lze přiblížit. Položky jsou zobrazeny ve více sloupcích v závislosti na velikosti displeje, počet sloupců je možné měnit gestem. Soubory můžete přejmenovávat, sdílet, mazat, kopírovat i přesouvat. Obrázky lze ořezávat, otáčen, nebo nastavit jako tapetu přímo v aplikaci. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
Galerie je též k disposici ostatním aplikacím za účelem zobrazení fotografií a videí a přidávání příloh v e-mailových klientech. Je vhodná ke každodennímu použití. It is open source, contains no ads or unnecessary permissions.
The fingerprint permission is needed for locking either hidden item visibility, or the whole app. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
Neobsahuje žádné reklamy ani nepotřebná oprávnění a má otevřený zdrojový kód. Poskytuje možnost změny barev rozhraní. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
Táto aplikace je jen jednou ze skupiny aplikací. Všechny tyto aplikace naleznete na https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>
<!-- <!--

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Afspil automatisk videoer</string> <string name="autoplay_videos">Afspil automatisk videoer</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Toggle filename visibility</string> <string name="toggle_filename">Toggle filename visibility</string>
<string name="loop_videos">Kør videoer i sløjfe</string> <string name="loop_videos">Kør videoer i sløjfe</string>
<string name="animate_gifs">Animér GIF\'er i miniaturer</string> <string name="animate_gifs">Animér GIF\'er i miniaturer</string>
@ -211,13 +212,29 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">A gallery for viewing photos and videos without ads.</string> <string name="app_short_description">A gallery for viewing photos and videos without ads.</string>
<string name="app_long_description"> <string name="app_long_description">
A simple tool usable for viewing photos and videos. Items can be sorted by date, size, name both ascending or descending, photos can be zoomed in. Media files are shown in multiple columns depending on the size of the display, you can change the column count by pinch gestures. They can be renamed, shared, deleted, copied, moved. Images can also be cropped, rotated, flipped or set as Wallpaper directly from the app. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
The Gallery is also offered for third party usage for previewing images / videos, adding attachments at email clients etc. It\'s perfect for everyday usage. It is open source, contains no ads or unnecessary permissions.
The fingerprint permission is needed for locking either hidden item visibility, or the whole app. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
Contains no ads or unnecessary permissions. It is fully opensource, provides customizable colors. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Videos automatisch abspielen</string> <string name="autoplay_videos">Videos automatisch abspielen</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Beschriftungen ein/aus</string> <string name="toggle_filename">Beschriftungen ein/aus</string>
<string name="loop_videos">Videos in Endlosschleife abspielen</string> <string name="loop_videos">Videos in Endlosschleife abspielen</string>
<string name="animate_gifs">Kacheln von GIFs animieren</string> <string name="animate_gifs">Kacheln von GIFs animieren</string>
@ -210,15 +211,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Eine schlichte Galerie zum Betrachten von Bildern und Videos, ganz ohne Werbung.</string> <string name="app_short_description">Eine schlichte Galerie zum Betrachten von Bildern und Videos, ganz ohne Werbung.</string>
<string name="app_long_description"> <string name="app_long_description">
Eine schlichte App zum Betrachten von Bildern und Videos. Alle Medien können nach Datum, Größe, Name sowie auf- oder absteigend sortiert werden, in Bilder kann auch hineingezoomt werden. Die Vorschau-Kacheln werden in mehreren Spalten abhängig von der Displaygröße angezeigt, die Spaltenanzahl ist mit Zweifingergesten änderbar. Die Medien können umbenannt, geteilt, gelöscht, kopiert und verschoben werden. Bilder können direkt aus der App heraus zugeschnitten, gedreht oder als Hintergrund festgelegt werden. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
Diese Galerie bietet auch für Drittanbieter einige Funktionen an: zur Vorschau von Bildern/Videos, zum Hinzufügen von Anhängen bei Email-Apps, etc. Sie ist perfekt für den täglichen Gebrauch. It is open source, contains no ads or unnecessary permissions.
Die Berechtigung für Fingerabdrücke wird nur benötigt, um die Sichtbarkeit von versteckten Dateien oder die gesamte App zu sperren. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
Beinhaltet keine Werbung oder unnötige Berechtigungen. Sie ist komplett Open Source, alle verwendeten Farben sind anpassbar. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
Diese App ist nur eine aus einer größeren Serie von schlichten Apps. Der Rest davon findet sich auf https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>
<!-- <!--

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Αυτόματη αναπαραγωγή βίντεο</string> <string name="autoplay_videos">Αυτόματη αναπαραγωγή βίντεο</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Αλλαγή προβολής ονόματος αρχείων</string> <string name="toggle_filename">Αλλαγή προβολής ονόματος αρχείων</string>
<string name="loop_videos">Επανάληψη βίντεο</string> <string name="loop_videos">Επανάληψη βίντεο</string>
<string name="animate_gifs">Εμφάνιση κινούμενων GIFs στα εικονίδια</string> <string name="animate_gifs">Εμφάνιση κινούμενων GIFs στα εικονίδια</string>
@ -211,15 +212,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Μία Gallery για την προβολή φωτογραφιών και βίντεο χωρίς διαφημίσεις.</string> <string name="app_short_description">Μία Gallery για την προβολή φωτογραφιών και βίντεο χωρίς διαφημίσεις.</string>
<string name="app_long_description"> <string name="app_long_description">
Μία απλή εφαρμογή για την προβολή φωτογραφιών και βίντεο. Τα αντικείμενα μπορούνα να ταξινομηθούν με βάση την ημερ/νία, το μέγεθος και το όνομα με αύξουσα ή φθήνουσα σειρά, οι φωτογραφίες μπορούν να μεγεθυνθούν. Τα αρχεία πολυμέσων εμφανίζονται σε πολλαπλές στήλες ανάλογα με τον μέγεθος της οθόνης και μπορείτε να αλλάξετε τον αριθμό των στηλών με τα 2 δάχτυλα (pintch). Μπορούν να μετονομαστούν, να μοιραστούν, να διαγραφούν, να αντιγραφούν και να μετακινηθούν. Οι εικόνες επίσης μπορούν να κοπούν, να περιστραφούν, να αντιστραφούν ή να οριστούν ως ταπετσαρίες κατευθείαν από την εφαρμογή. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
Η Gallery επίσης μπορεί να χρησιμοποιηθεί από άλλες εφαρμογές για προεμφάνιση φωτογραφιών / βίντεο, να μπουν ως επισυνάψεις σε εφαρμογές email κλπ. Είναι τέλεια για καθημερινή χρήση. It is open source, contains no ads or unnecessary permissions.
Η εξουσιοδότηση δαχτυλικού αποτυπώματος χρειάζεται για το κλείδωμα των κρυφών αντικειμένων ή ολόκληρης της εφαρμογής. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
Δεν περιέχει διαφημίσεις ή περιττά δικαιώματα. Έιναι όλη ανοιχτού κώδικα και παρέχει προσαρμόσιμα χρώματα για την εφαρμογή. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
Αυτή η εφαρμογή είναι μέρος μιας σειράς εφαρμογών. Μπορείτε να βρείτε τις υπόλοιπες στο https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>
<!-- <!--

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Reproducir vídeos automáticamente</string> <string name="autoplay_videos">Reproducir vídeos automáticamente</string>
<string name="remember_last_video_position">Recuerde la última posición de reproducción de video</string>
<string name="toggle_filename">Cambiar la visibilidad del nombre de archivo</string> <string name="toggle_filename">Cambiar la visibilidad del nombre de archivo</string>
<string name="loop_videos">Reproducción continua de vídeos</string> <string name="loop_videos">Reproducción continua de vídeos</string>
<string name="animate_gifs">Animar las miniaturas de GIFs</string> <string name="animate_gifs">Animar las miniaturas de GIFs</string>
@ -211,15 +212,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Una galería para ver fotos y vídeos sin publicidad.</string> <string name="app_short_description">Una galería para ver fotos y vídeos sin publicidad.</string>
<string name="app_long_description"> <string name="app_long_description">
Una herramienta sencilla que se puede usar para ver fotos y vídeos. Los elementos se pueden ordenar por fecha, tamaño, nombre tanto ascendente como descendente; se puede hacer zoom en las fotos. Los archivos de medios se muestran en múltiples columnas dependiendo del tamaño de la pantalla, y se puede cambiar el número de columnas mediante gestos. Permite renombrar, compartir, borrar, mover. Las imágenes también se pueden recortar, rotar o usarse como fondo de pantalla directamente desde la aplicación. Una galería altamente personalizable capaz de mostrar diferentes tipos de imágenes y videos, incluyendo SVG, RAW, fotos panorámicas y videos.
Gallery también se ofrece para uso de terceros para previsualizar imágenes/vídeos, agregar adjuntos en clientes de correo, etc. Es perfecta para uso diario. Es de código abierto, no contiene anuncios o permisos innecesarios.
El permiso de huella digital es necesario para bloquear la visibilidad de elementos ocultos o toda la aplicación. Vamos a enumerar algunas de sus características que vale la pena mencionar:
1. Buscar
2. Presentación de diapositivas
3. Soporte de muesca
4. Fijado de carpetas en la parte superior.
5. Filtrado de archivos multimedia por tipo
6. Papelera de reciclaje para una fácil recuperación de archivos
7. Bloqueo de orientación de vista de pantalla completa
8. Marcar los archivos favoritos para facilitar el acceso
9. Cierre rápido de medios a pantalla completa con gesto hacia abajo.
10. Un editor para modificar imágenes y aplicar filtros.
11. Protección de contraseña para proteger elementos ocultos o la aplicación completa
12. Cambiar el número de la columna de miniaturas con gestos o botones de menú
13. Acciones inferiores personalizables en la vista de pantalla completa para un acceso rápido
14. Mostrar detalles extendidos en medios de pantalla completa con las propiedades de archivo deseadas
15. Varias formas diferentes de clasificar o agrupar elementos, tanto ascendentes como descendentes
16. Ocultar carpetas (afecta también a otras aplicaciones), excluyendo carpetas (afecta solo a Simple Gallery)
No contiene publicidad ni permisos innecesarios. Es totalmente libre, proporciona colores personalizables. El permiso de huella digital es necesario para bloquear la visibilidad de los elementos ocultos, la aplicación completa o proteger los archivos para evitar que se eliminen.
Esta aplicación es solamente una pieza de una serie más grande de aplicaciones. Puede encontrar el resto en https://www.simplemobiletools.com Esta aplicación es solo una parte de una serie más grande de aplicaciones. Puede encontrar el resto de ellos en https://www.simplemobiletools.com
</string> </string>
<!-- <!--

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Toista videot automaattisesti</string> <string name="autoplay_videos">Toista videot automaattisesti</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Tiedostonimien näkyvyys</string> <string name="toggle_filename">Tiedostonimien näkyvyys</string>
<string name="loop_videos">Jatkuvat videot</string> <string name="loop_videos">Jatkuvat videot</string>
<string name="animate_gifs">Animoi GIFit pienoiskuvissa</string> <string name="animate_gifs">Animoi GIFit pienoiskuvissa</string>
@ -211,15 +212,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Galleria kuvien ja videoiden katsomiseen ilman mainoksia.</string> <string name="app_short_description">Galleria kuvien ja videoiden katsomiseen ilman mainoksia.</string>
<string name="app_long_description"> <string name="app_long_description">
Yksinkertainen työkalu kuvien ja videoiden katsomiseen. Kohteita voidaan lajitella päivän, koon, nimen mukaan, nousevassa ja laskevassa järjestyksessä. Kuvia voidaan zoomata. Mediatiedostot näkyvät useissa sarakkeissa joiden määrää muutetaan nipistys-eleellä. Tiedostoja voidaan uudelleennimetä, jakaa, poistaa, kopioida. Kuvia voi rajata, pyörittää tai asettaa taustakuvaksi suoraan sovelluksesta. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
Galleriaa tarjotaan myös kolmansille osapuolille kuvien / videoiden tarkasteluun, liitteiden lisäämiseksi sähköpostiin yms. Täydellinen jokapäiväiseen käyttöön. It is open source, contains no ads or unnecessary permissions.
The fingerprint permission is needed for locking either hidden item visibility, or the whole app. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
Ei sisällä mainoksia tai turhia käyttöoikeuksia. Täysin avointa lähdekoodia, tarjoaa muokattavat värit. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
Tämä sovellus on vain yksi osa suurempaa kokoelmaa. Löydät loput osoitteesta https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>
<!-- <!--

View file

@ -130,10 +130,10 @@
<string name="by_date_taken">Date de prise de vue</string> <string name="by_date_taken">Date de prise de vue</string>
<string name="by_file_type">Type de fichier</string> <string name="by_file_type">Type de fichier</string>
<string name="by_extension">Extension</string> <string name="by_extension">Extension</string>
<string name="use_for_this_folder">Définir pour ce dossier uniquement</string>
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Lecture automatique des vidéos</string> <string name="autoplay_videos">Lecture automatique des vidéos</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Permuter la visibilité des noms de fichier</string> <string name="toggle_filename">Permuter la visibilité des noms de fichier</string>
<string name="loop_videos">Lecture en boucle des vidéos</string> <string name="loop_videos">Lecture en boucle des vidéos</string>
<string name="animate_gifs">GIFs animés sur les miniatures</string> <string name="animate_gifs">GIFs animés sur les miniatures</string>
@ -158,7 +158,6 @@
<string name="allow_deep_zooming_images">Utiliser le zoom maximal des images</string> <string name="allow_deep_zooming_images">Utiliser le zoom maximal des images</string>
<string name="hide_extended_details">Ne pas afficher les informations supplémentaires si la barre d\'état est masquée</string> <string name="hide_extended_details">Ne pas afficher les informations supplémentaires si la barre d\'état est masquée</string>
<string name="do_extra_check">Éviter l\'affichage de fichiers non conformes</string> <string name="do_extra_check">Éviter l\'affichage de fichiers non conformes</string>
<string name="show_hidden_items">Afficher les éléments masqués</string>
<string name="show_at_bottom">Afficher les boutons d\'action</string> <string name="show_at_bottom">Afficher les boutons d\'action</string>
<string name="show_recycle_bin">Afficher la corbeille en vue \"Dossier\"</string> <string name="show_recycle_bin">Afficher la corbeille en vue \"Dossier\"</string>
<string name="deep_zoomable_images">Niveau de zoom maximal des images</string> <string name="deep_zoomable_images">Niveau de zoom maximal des images</string>
@ -211,15 +210,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Une galerie pour visionner photos et vidéos sans publicité.</string> <string name="app_short_description">Une galerie pour visionner photos et vidéos sans publicité.</string>
<string name="app_long_description"> <string name="app_long_description">
Un outil simple pour visionner les photos et les vidéos. Elles peuvent être triées par dates, dimensions, noms dans les deux ordres (alphabétique ou alphabétique inversé), il est possible de zoomer sur les photos. Les fichiers sont affichés sur de multiples colonnes en fonction de la dimension de l\'écran, vous pouvez changer le nombre de colonnes par pincement. Elles peuvent être renommées, partagées, supprimées, copiées et déplacées. Les images peuvent en plus être pivotées, rognées ou être définies comme fond d\'écran directement depuis l\'application. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
La galerie est également proposée pour une utilisation comme tierce partie pour la prévisualisation des images/vidéos, ajouter des pièces jointes aux clients de courriel, etc… C\'est parfait pour un usage au quotidien. It is open source, contains no ads or unnecessary permissions.
L\'autorisation d\'empreinte digitale est nécessaire pour verrouiller les dossiers masqués et/ou l\'application. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
L\'application ne contient ni publicité, ni autorisation inutile. Elle est totalement opensource et est également fournie avec des couleurs personnalisables. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
Cette application fait partie d\'une plus grande suite. Vous pouvez trouver les autres applications sur https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>
<!-- <!--

View file

@ -133,6 +133,7 @@
<!-- Settings --> <!-- Settings -->
<string name="autoplay_videos">Reproducir vídeos automticamente</string> <string name="autoplay_videos">Reproducir vídeos automticamente</string>
<string name="remember_last_video_position">Remember last video playback position</string>
<string name="toggle_filename">Mudar a visibilidade do ficheiro</string> <string name="toggle_filename">Mudar a visibilidade do ficheiro</string>
<string name="loop_videos">videos en bucle</string> <string name="loop_videos">videos en bucle</string>
<string name="animate_gifs">Animar os GIFs na icona</string> <string name="animate_gifs">Animar os GIFs na icona</string>
@ -211,15 +212,31 @@
<!-- Short description has to have less than 80 chars --> <!-- Short description has to have less than 80 chars -->
<string name="app_short_description">Unha galería para ver fotos e videos, pero non publicidade.</string> <string name="app_short_description">Unha galería para ver fotos e videos, pero non publicidade.</string>
<string name="app_long_description"> <string name="app_long_description">
Unha simple ferramenta para ver fotos e vídeos. Pode organizar os elementos por data, tamaño, nome tanto ascendentes como descendentes, pode facer zoom nas fotografías. Os ficheiros de medios móstranse en múltiples columnas dependendo do tamaño da pantalla, pode mudar o número de columnas con xestos de belisco. Poden ser renomeados, compartidos, eliminados, copiados, movidos. As imaxes tamén se poden recortar, rotar, voltear ou establecer como fondo de pantalla directamente no aplicativo. A highly customizable gallery capable of displaying many different image and video types including SVGs, RAWs, panoramic photos and videos.
A Galería tamén se ofrece como aplicación de terceiros para vista previa de imaxes / vídeos, engadir anexos en correos etc. É perfecta para o uso diario. It is open source, contains no ads or unnecessary permissions.
O permiso de pegada é preciso para bloquear a visibilidade de elementos ocultos ou o aplicativo completo. Let\'s list some of its features worth mentioning:
1. Search
2. Slideshow
3. Notch support
4. Pinning folders to the top
5. Filtering media files by type
6. Recycle bin for easy file recovery
7. Fullscreen view orientation locking
8. Marking favorite files for easy access
9. Quick fullscreen media closing with down gesture
10. An editor for modifying images and applying filters
11. Password protection for protecting hidden items or the whole app
12. Changing the thumbnail column count with gestures or menu buttons
13. Customizable bottom actions at the fullscreen view for quick access
14. Showing extended details over fullscreen media with desired file properties
15. Several different ways of sorting or grouping items, both ascending and descending
16. Hiding folders (affects other apps too), excluding folders (affects only Simple Gallery)
Non contén anuncios nin solicita permisos innecesarios. É de código aberto, con cores personalizadas. The fingerprint permission is needed for locking either hidden item visibility, the whole app, or protecting files from being deleted.
Este aplicativo é só unha das pezas de unha grande familia. Pode atopar o resto en https://www.simplemobiletools.com This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
</string> </string>
<!-- <!--

Some files were not shown because too many files have changed in this diff Show more