mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
commit
5adff96524
76 changed files with 2390 additions and 957 deletions
61
CHANGELOG.md
61
CHANGELOG.md
|
@ -1,6 +1,67 @@
|
||||||
Changelog
|
Changelog
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
Version 2.17.4 *(2017-11-06)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fixed some third party intent handling
|
||||||
|
* Increased max columns count to 20
|
||||||
|
* Allow rotating JPGs in a lossless way (by ltGuillaume)
|
||||||
|
|
||||||
|
Version 2.17.3 *(2017-11-02)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fixed some corrupt gif file related crashes
|
||||||
|
* Rotate jpgs on the internal storage by exif
|
||||||
|
* Fixed some invisible SD card content
|
||||||
|
|
||||||
|
Version 2.17.2 *(2017-10-29)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Couple more minor fixes
|
||||||
|
|
||||||
|
Version 2.17.1 *(2017-10-29)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Show "Set As" and "Edit" menu buttons at videos and gifs too
|
||||||
|
* Couple other smaller issues fixed
|
||||||
|
|
||||||
|
Version 2.17.0 *(2017-10-28)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Added a toggle for keeping last-modified field at file copy/move/rename
|
||||||
|
* Improved GIF animation speed
|
||||||
|
* Implemented fileprovider support to third party intents
|
||||||
|
* Make rotation by "Device rotation" less sensitive
|
||||||
|
* Automatically append "_1" to filename after saving through the Editor
|
||||||
|
* Added support for Adaptive icons for Android 8 (by fiepi)
|
||||||
|
* Added Dutch translation (by ltGuillaume)
|
||||||
|
* Many other smaller improvements
|
||||||
|
|
||||||
|
Version 2.16.1 *(2017-10-24)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Added a toggle for hiding folder media count on the main screen
|
||||||
|
* Fixed SD card folders not being visible on some devices
|
||||||
|
* Fixed videos not playing properly in some cases
|
||||||
|
* Do not modify last_modified at copy/move/rename
|
||||||
|
* Added support for 3gpp videos
|
||||||
|
|
||||||
|
Version 2.16.0 *(2017-10-19)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Added sorting by path
|
||||||
|
* Added an option to show customizable extended details over fullscreen media
|
||||||
|
* Allow selecting Album cover photos from any folders
|
||||||
|
* Added a checkbox for skipping Delete confirmation dialog
|
||||||
|
|
||||||
|
Version 2.15.2 *(2017-10-06)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Properly display SD card content to Android 4 users
|
||||||
|
* Fix displaying some third party media, like Bluemail attachments
|
||||||
|
* Fix media picking intents if "Show all folders content" is enabled
|
||||||
|
|
||||||
Version 2.15.1 *(2017-10-01)*
|
Version 2.15.1 *(2017-10-01)*
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
|
|
@ -3,15 +3,15 @@ apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 25
|
compileSdkVersion 27
|
||||||
buildToolsVersion "25.0.2"
|
buildToolsVersion "27.0.1"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.simplemobiletools.gallery"
|
applicationId "com.simplemobiletools.gallery"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 23
|
targetSdkVersion 27
|
||||||
versionCode 134
|
versionCode 142
|
||||||
versionName "2.15.1"
|
versionName "2.17.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
@ -19,10 +19,14 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
buildConfigField "boolean", "USE_LEAK_CANARY", "true"
|
||||||
|
}
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
|
buildConfigField "boolean", "USE_LEAK_CANARY", "false"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,19 +40,22 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext {
|
||||||
|
leakCanaryVersion = '1.5.4'
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.simplemobiletools:commons:2.29.1'
|
compile 'com.simplemobiletools:commons:2.37.12'
|
||||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.7.2'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
compile 'com.google.code.gson:gson:2.8.0'
|
compile 'com.google.code.gson:gson:2.8.2'
|
||||||
compile 'com.github.chrisbanes:PhotoView:2.1.2'
|
|
||||||
compile 'it.sephiroth.android.exif:library:1.0.1'
|
compile 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.8'
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
|
|
||||||
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
|
debugCompile "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
||||||
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
|
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
||||||
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
|
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
|
@ -1,5 +1,2 @@
|
||||||
-keep class com.simplemobiletools.** { *; }
|
-keep class com.simplemobiletools.** { *; }
|
||||||
-dontwarn com.simplemobiletools.**
|
-dontwarn com.simplemobiletools.**
|
||||||
|
|
||||||
-renamesourcefileattribute SourceFile
|
|
||||||
-keepattributes SourceFile,LineNumberTable
|
|
||||||
|
|
|
@ -83,16 +83,16 @@
|
||||||
android:label="@string/third_party_licences"
|
android:label="@string/third_party_licences"
|
||||||
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/>
|
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/>
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".activities.SettingsActivity"
|
|
||||||
android:label="@string/settings"
|
|
||||||
android:parentActivityName=".activities.MainActivity"/>
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
|
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
|
||||||
android:label="@string/customize_colors"
|
android:label="@string/customize_colors"
|
||||||
android:parentActivityName=".activities.SettingsActivity"/>
|
android:parentActivityName=".activities.SettingsActivity"/>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".activities.SettingsActivity"
|
||||||
|
android:label="@string/settings"
|
||||||
|
android:parentActivityName=".activities.MainActivity"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.PhotoVideoActivity"
|
android:name=".activities.PhotoVideoActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
|
|
|
@ -2,18 +2,26 @@ package com.simplemobiletools.gallery
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import com.github.ajalt.reprint.core.Reprint
|
import com.github.ajalt.reprint.core.Reprint
|
||||||
|
import com.simplemobiletools.gallery.BuildConfig.USE_LEAK_CANARY
|
||||||
|
import com.simplemobiletools.gallery.extensions.config
|
||||||
import com.squareup.leakcanary.LeakCanary
|
import com.squareup.leakcanary.LeakCanary
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
val USE_LEAK_CANARY = false
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
Reprint.initialize(this)
|
|
||||||
if (USE_LEAK_CANARY) {
|
if (USE_LEAK_CANARY) {
|
||||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
LeakCanary.install(this)
|
LeakCanary.install(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.useEnglish) {
|
||||||
|
val conf = resources.configuration
|
||||||
|
conf.locale = Locale.ENGLISH
|
||||||
|
resources.updateConfiguration(conf, resources.displayMetrics)
|
||||||
|
}
|
||||||
|
Reprint.initialize(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,29 +7,24 @@ 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 android.util.Log
|
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import com.simplemobiletools.commons.extensions.getCompressionFormat
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.extensions.getFileOutputStream
|
|
||||||
import com.simplemobiletools.commons.extensions.scanPath
|
|
||||||
import com.simplemobiletools.commons.extensions.toast
|
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.dialogs.ResizeDialog
|
import com.simplemobiletools.gallery.dialogs.ResizeDialog
|
||||||
import com.simplemobiletools.gallery.dialogs.SaveAsDialog
|
import com.simplemobiletools.gallery.dialogs.SaveAsDialog
|
||||||
import com.simplemobiletools.gallery.extensions.getRealPathFromURI
|
|
||||||
import com.simplemobiletools.gallery.extensions.openEditor
|
import com.simplemobiletools.gallery.extensions.openEditor
|
||||||
import com.theartofdev.edmodo.cropper.CropImageView
|
import com.theartofdev.edmodo.cropper.CropImageView
|
||||||
import kotlinx.android.synthetic.main.view_crop_image.*
|
import kotlinx.android.synthetic.main.view_crop_image.*
|
||||||
import java.io.*
|
import java.io.*
|
||||||
|
|
||||||
class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener {
|
class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener {
|
||||||
val TAG = EditActivity::class.java.simpleName
|
private val ASPECT_X = "aspectX"
|
||||||
val ASPECT_X = "aspectX"
|
private val ASPECT_Y = "aspectY"
|
||||||
val ASPECT_Y = "aspectY"
|
private val CROP = "crop"
|
||||||
val CROP = "crop"
|
|
||||||
|
|
||||||
lateinit var uri: Uri
|
lateinit var uri: Uri
|
||||||
|
lateinit var saveUri: Uri
|
||||||
var resizeWidth = 0
|
var resizeWidth = 0
|
||||||
var resizeHeight = 0
|
var resizeHeight = 0
|
||||||
var isCropIntent = false
|
var isCropIntent = false
|
||||||
|
@ -52,11 +47,17 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveUri = if (intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true) {
|
||||||
|
intent.extras!!.get(MediaStore.EXTRA_OUTPUT) as Uri
|
||||||
|
} else {
|
||||||
|
uri
|
||||||
|
}
|
||||||
|
|
||||||
isCropIntent = intent.extras?.get(CROP) == "true"
|
isCropIntent = intent.extras?.get(CROP) == "true"
|
||||||
|
|
||||||
crop_image_view.apply {
|
crop_image_view.apply {
|
||||||
setOnCropImageCompleteListener(this@EditActivity)
|
setOnCropImageCompleteListener(this@EditActivity)
|
||||||
setImageUriAsync(intent.data)
|
setImageUriAsync(uri)
|
||||||
|
|
||||||
if (isCropIntent && shouldCropSquare())
|
if (isCropIntent && shouldCropSquare())
|
||||||
setFixedAspectRatio(true)
|
setFixedAspectRatio(true)
|
||||||
|
@ -70,9 +71,10 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
|
|
||||||
override fun onStop() {
|
override fun onStop() {
|
||||||
super.onStop()
|
super.onStop()
|
||||||
if (isEditingWithThirdParty)
|
if (isEditingWithThirdParty) {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
menuInflater.inflate(R.menu.menu_editor, menu)
|
menuInflater.inflate(R.menu.menu_editor, menu)
|
||||||
|
@ -128,15 +130,14 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
|
|
||||||
override fun onCropImageComplete(view: CropImageView, result: CropImageView.CropResult) {
|
override fun onCropImageComplete(view: CropImageView, result: CropImageView.CropResult) {
|
||||||
if (result.error == null) {
|
if (result.error == null) {
|
||||||
if (isCropIntent && intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true) {
|
if (isCropIntent) {
|
||||||
val targetUri = intent.extras!!.get(MediaStore.EXTRA_OUTPUT) as Uri
|
|
||||||
var inputStream: InputStream? = null
|
var inputStream: InputStream? = null
|
||||||
var outputStream: OutputStream? = null
|
var outputStream: OutputStream? = null
|
||||||
try {
|
try {
|
||||||
val stream = ByteArrayOutputStream()
|
val stream = ByteArrayOutputStream()
|
||||||
result.bitmap.compress(CompressFormat.JPEG, 100, stream)
|
result.bitmap.compress(CompressFormat.JPEG, 100, stream)
|
||||||
inputStream = ByteArrayInputStream(stream.toByteArray())
|
inputStream = ByteArrayInputStream(stream.toByteArray())
|
||||||
outputStream = contentResolver.openOutputStream(targetUri)
|
outputStream = contentResolver.openOutputStream(saveUri)
|
||||||
inputStream.copyTo(outputStream)
|
inputStream.copyTo(outputStream)
|
||||||
} finally {
|
} finally {
|
||||||
inputStream?.close()
|
inputStream?.close()
|
||||||
|
@ -144,23 +145,21 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
}
|
}
|
||||||
setResult(RESULT_OK)
|
setResult(RESULT_OK)
|
||||||
finish()
|
finish()
|
||||||
} else if (uri.scheme == "file") {
|
} else if (saveUri.scheme == "file") {
|
||||||
SaveAsDialog(this, uri.path) {
|
SaveAsDialog(this, saveUri.path, true) {
|
||||||
saveBitmapToFile(result.bitmap, it)
|
saveBitmapToFile(result.bitmap, it)
|
||||||
}
|
}
|
||||||
} else if (uri.scheme == "content") {
|
} else if (saveUri.scheme == "content") {
|
||||||
val newPath = applicationContext.getRealPathFromURI(uri) ?: ""
|
val newPath = applicationContext.getRealPathFromURI(saveUri) ?: ""
|
||||||
if (!newPath.isEmpty()) {
|
if (!newPath.isEmpty()) {
|
||||||
SaveAsDialog(this, newPath) {
|
SaveAsDialog(this, newPath, true) {
|
||||||
saveBitmapToFile(result.bitmap, it)
|
saveBitmapToFile(result.bitmap, it)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toast(R.string.image_editing_failed)
|
toast(R.string.image_editing_failed)
|
||||||
finish()
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toast(R.string.unknown_file_location)
|
toast(R.string.unknown_file_location)
|
||||||
finish()
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toast("${getString(R.string.image_editing_failed)}: ${result.error.message}")
|
toast("${getString(R.string.image_editing_failed)}: ${result.error.message}")
|
||||||
|
@ -179,9 +178,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "Crop compressing failed $path $e")
|
showErrorToast(e)
|
||||||
toast(R.string.image_editing_failed)
|
|
||||||
finish()
|
|
||||||
} catch (e: OutOfMemoryError) {
|
} catch (e: OutOfMemoryError) {
|
||||||
toast(R.string.out_of_memory_error)
|
toast(R.string.out_of_memory_error)
|
||||||
}
|
}
|
||||||
|
@ -200,14 +197,15 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun flipImage(horizontally: Boolean) {
|
private fun flipImage(horizontally: Boolean) {
|
||||||
if (horizontally)
|
if (horizontally) {
|
||||||
crop_image_view.flipImageHorizontally()
|
crop_image_view.flipImageHorizontally()
|
||||||
else
|
} else {
|
||||||
crop_image_view.flipImageVertically()
|
crop_image_view.flipImageVertically()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun editWith() {
|
private fun editWith() {
|
||||||
openEditor(uri, true)
|
openEditor(uri)
|
||||||
isEditingWithThirdParty = true
|
isEditingWithThirdParty = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
package com.simplemobiletools.gallery.activities
|
package com.simplemobiletools.gallery.activities
|
||||||
|
|
||||||
import android.Manifest
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.ClipData
|
import android.content.ClipData
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.support.v4.app.ActivityCompat
|
|
||||||
import android.support.v7.widget.GridLayoutManager
|
import android.support.v7.widget.GridLayoutManager
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
|
@ -21,6 +18,7 @@ import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
|
||||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
|
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
|
||||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN
|
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
|
@ -40,7 +38,6 @@ import java.io.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
private val STORAGE_PERMISSION = 1
|
|
||||||
private val PICK_MEDIA = 2
|
private val PICK_MEDIA = 2
|
||||||
private val PICK_WALLPAPER = 3
|
private val PICK_WALLPAPER = 3
|
||||||
private val LAST_MEDIA_CHECK_PERIOD = 3000L
|
private val LAST_MEDIA_CHECK_PERIOD = 3000L
|
||||||
|
@ -53,13 +50,17 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
private var mIsGetVideoContentIntent = false
|
private var mIsGetVideoContentIntent = false
|
||||||
private var mIsGetAnyContentIntent = false
|
private var mIsGetAnyContentIntent = false
|
||||||
private var mIsSetWallpaperIntent = false
|
private var mIsSetWallpaperIntent = false
|
||||||
|
private var mAllowPickingMultiple = false
|
||||||
private var mIsThirdPartyIntent = false
|
private var mIsThirdPartyIntent = false
|
||||||
private var mIsGettingDirs = false
|
private var mIsGettingDirs = false
|
||||||
|
private var mStoredUseEnglish = false
|
||||||
private var mStoredAnimateGifs = true
|
private var mStoredAnimateGifs = true
|
||||||
private var mStoredCropThumbnails = true
|
private var mStoredCropThumbnails = true
|
||||||
private var mStoredScrollHorizontally = true
|
private var mStoredScrollHorizontally = true
|
||||||
|
private var mStoredShowMediaCount = true
|
||||||
private var mStoredTextColor = 0
|
private var mStoredTextColor = 0
|
||||||
private var mLoadedInitialPhotos = false
|
private var mLoadedInitialPhotos = false
|
||||||
|
private var mIsPasswordProtectionPending = false
|
||||||
private var mLatestMediaId = 0L
|
private var mLatestMediaId = 0L
|
||||||
private var mLastMediaHandler = Handler()
|
private var mLastMediaHandler = Handler()
|
||||||
private var mCurrAsyncTask: GetDirectoriesAsynctask? = null
|
private var mCurrAsyncTask: GetDirectoriesAsynctask? = null
|
||||||
|
@ -67,6 +68,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
|
storeStoragePaths()
|
||||||
|
|
||||||
mIsPickImageIntent = isPickImageIntent(intent)
|
mIsPickImageIntent = isPickImageIntent(intent)
|
||||||
mIsPickVideoIntent = isPickVideoIntent(intent)
|
mIsPickVideoIntent = isPickVideoIntent(intent)
|
||||||
|
@ -74,22 +76,21 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
mIsGetVideoContentIntent = isGetVideoContentIntent(intent)
|
mIsGetVideoContentIntent = isGetVideoContentIntent(intent)
|
||||||
mIsGetAnyContentIntent = isGetAnyContentIntent(intent)
|
mIsGetAnyContentIntent = isGetAnyContentIntent(intent)
|
||||||
mIsSetWallpaperIntent = isSetWallpaperIntent(intent)
|
mIsSetWallpaperIntent = isSetWallpaperIntent(intent)
|
||||||
|
mAllowPickingMultiple = intent.getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false)
|
||||||
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
||||||
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
||||||
|
|
||||||
removeTempFolder()
|
removeTempFolder()
|
||||||
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
||||||
mDirs = ArrayList()
|
mDirs = ArrayList()
|
||||||
mStoredAnimateGifs = config.animateGifs
|
storeStateVariables()
|
||||||
mStoredCropThumbnails = config.cropThumbnails
|
|
||||||
mStoredScrollHorizontally = config.scrollHorizontally
|
|
||||||
mStoredTextColor = config.textColor
|
|
||||||
storeStoragePaths()
|
|
||||||
checkWhatsNewDialog()
|
checkWhatsNewDialog()
|
||||||
|
|
||||||
directories_empty_text.setOnClickListener {
|
directories_empty_text.setOnClickListener {
|
||||||
showFilterMediaDialog()
|
showFilterMediaDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mIsPasswordProtectionPending = config.appPasswordProtectionOn
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
|
@ -97,7 +98,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
menuInflater.inflate(R.menu.menu_main_intent, menu)
|
menuInflater.inflate(R.menu.menu_main_intent, menu)
|
||||||
} else {
|
} else {
|
||||||
menuInflater.inflate(R.menu.menu_main, menu)
|
menuInflater.inflate(R.menu.menu_main, menu)
|
||||||
menu.findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < 10
|
menu.findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < MAX_COLUMN_COUNT
|
||||||
menu.findItem(R.id.reduce_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt > 1
|
menu.findItem(R.id.reduce_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt > 1
|
||||||
}
|
}
|
||||||
menu.findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
|
menu.findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
|
||||||
|
@ -127,30 +128,48 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
config.isThirdPartyIntent = false
|
config.isThirdPartyIntent = false
|
||||||
|
if (mStoredUseEnglish != config.useEnglish) {
|
||||||
|
restartActivity()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (mStoredAnimateGifs != config.animateGifs) {
|
if (mStoredAnimateGifs != config.animateGifs) {
|
||||||
directories_grid.adapter?.notifyDataSetChanged()
|
getDirectoryAdapter()?.updateAnimateGifs(config.animateGifs)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mStoredCropThumbnails != config.cropThumbnails) {
|
if (mStoredCropThumbnails != config.cropThumbnails) {
|
||||||
directories_grid.adapter?.notifyDataSetChanged()
|
getDirectoryAdapter()?.updateCropThumbnails(config.cropThumbnails)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mStoredShowMediaCount != config.showMediaCount) {
|
||||||
|
getDirectoryAdapter()?.updateShowMediaCount(config.showMediaCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mStoredScrollHorizontally != config.scrollHorizontally) {
|
if (mStoredScrollHorizontally != config.scrollHorizontally) {
|
||||||
(directories_grid.adapter as? DirectoryAdapter)?.apply {
|
getDirectoryAdapter()?.updateScrollHorizontally(config.viewTypeFolders != VIEW_TYPE_LIST && config.scrollHorizontally)
|
||||||
scrollVertically = config.viewTypeFolders == VIEW_TYPE_LIST || !config.scrollHorizontally
|
|
||||||
notifyDataSetChanged()
|
|
||||||
}
|
|
||||||
setupScrollDirection()
|
setupScrollDirection()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mStoredTextColor != config.textColor) {
|
if (mStoredTextColor != config.textColor) {
|
||||||
(directories_grid.adapter as? DirectoryAdapter)?.updateTextColor(config.textColor)
|
getDirectoryAdapter()?.updateTextColor(config.textColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
tryloadGallery()
|
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
directories_empty_text_label.setTextColor(config.textColor)
|
directories_empty_text_label.setTextColor(config.textColor)
|
||||||
directories_empty_text.setTextColor(config.primaryColor)
|
directories_empty_text.setTextColor(config.primaryColor)
|
||||||
|
|
||||||
|
if (mIsPasswordProtectionPending) {
|
||||||
|
handleAppPasswordProtection {
|
||||||
|
if (it) {
|
||||||
|
mIsPasswordProtectionPending = false
|
||||||
|
tryloadGallery()
|
||||||
|
} else {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tryloadGallery()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
@ -158,14 +177,14 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
storeDirectories()
|
storeDirectories()
|
||||||
directories_refresh_layout.isRefreshing = false
|
directories_refresh_layout.isRefreshing = false
|
||||||
mIsGettingDirs = false
|
mIsGettingDirs = false
|
||||||
mStoredAnimateGifs = config.animateGifs
|
storeStateVariables()
|
||||||
mStoredCropThumbnails = config.cropThumbnails
|
|
||||||
mStoredScrollHorizontally = config.scrollHorizontally
|
|
||||||
mStoredTextColor = config.textColor
|
|
||||||
directories_grid.listener = null
|
directories_grid.listener = null
|
||||||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||||
|
|
||||||
|
if (!mDirs.isEmpty()) {
|
||||||
mCurrAsyncTask?.stopFetching()
|
mCurrAsyncTask?.stopFetching()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
@ -173,6 +192,19 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
removeTempFolder()
|
removeTempFolder()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getDirectoryAdapter() = directories_grid.adapter as? DirectoryAdapter
|
||||||
|
|
||||||
|
private fun storeStateVariables() {
|
||||||
|
config.apply {
|
||||||
|
mStoredUseEnglish = useEnglish
|
||||||
|
mStoredAnimateGifs = animateGifs
|
||||||
|
mStoredCropThumbnails = cropThumbnails
|
||||||
|
mStoredScrollHorizontally = scrollHorizontally
|
||||||
|
mStoredShowMediaCount = showMediaCount
|
||||||
|
mStoredTextColor = textColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun removeTempFolder() {
|
private fun removeTempFolder() {
|
||||||
val newFolder = File(config.tempFolderPath)
|
val newFolder = File(config.tempFolderPath)
|
||||||
if (newFolder.exists() && newFolder.isDirectory) {
|
if (newFolder.exists() && newFolder.isDirectory) {
|
||||||
|
@ -184,25 +216,16 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun tryloadGallery() {
|
private fun tryloadGallery() {
|
||||||
if (hasWriteStoragePermission()) {
|
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||||
if (config.showAll)
|
if (it) {
|
||||||
|
if (config.showAll) {
|
||||||
showAllMedia()
|
showAllMedia()
|
||||||
else
|
} else {
|
||||||
getDirectories()
|
getDirectories()
|
||||||
|
}
|
||||||
|
|
||||||
setupLayoutManager()
|
setupLayoutManager()
|
||||||
checkIfColorChanged()
|
checkIfColorChanged()
|
||||||
} else {
|
|
||||||
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE), STORAGE_PERMISSION)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
|
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
|
||||||
|
|
||||||
if (requestCode == STORAGE_PERMISSION) {
|
|
||||||
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
|
||||||
getDirectories()
|
|
||||||
} else {
|
} else {
|
||||||
toast(R.string.no_storage_permissions)
|
toast(R.string.no_storage_permissions)
|
||||||
finish()
|
finish()
|
||||||
|
@ -313,11 +336,12 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
private fun getRecyclerAdapter() = (directories_grid.adapter as DirectoryAdapter)
|
private fun getRecyclerAdapter() = (directories_grid.adapter as DirectoryAdapter)
|
||||||
|
|
||||||
private fun setupLayoutManager() {
|
private fun setupLayoutManager() {
|
||||||
if (config.viewTypeFolders == VIEW_TYPE_GRID)
|
if (config.viewTypeFolders == VIEW_TYPE_GRID) {
|
||||||
setupGridLayoutManager()
|
setupGridLayoutManager()
|
||||||
else
|
} else {
|
||||||
setupListLayoutManager()
|
setupListLayoutManager()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupGridLayoutManager() {
|
private fun setupGridLayoutManager() {
|
||||||
val layoutManager = directories_grid.layoutManager as GridLayoutManager
|
val layoutManager = directories_grid.layoutManager as GridLayoutManager
|
||||||
|
@ -341,7 +365,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun zoomOut() {
|
override fun zoomOut() {
|
||||||
if (layoutManager.spanCount < 10) {
|
if (layoutManager.spanCount < MAX_COLUMN_COUNT) {
|
||||||
increaseColumnCount()
|
increaseColumnCount()
|
||||||
getRecyclerAdapter().actMode?.finish()
|
getRecyclerAdapter().actMode?.finish()
|
||||||
}
|
}
|
||||||
|
@ -428,7 +452,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
} else if ((mIsPickImageIntent || mIsPickVideoIntent)) {
|
} else if ((mIsPickImageIntent || mIsPickVideoIntent)) {
|
||||||
val path = resultData.data.path
|
val path = resultData.data.path
|
||||||
val uri = Uri.fromFile(File(path))
|
val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID)
|
||||||
resultIntent.data = uri
|
resultIntent.data = uri
|
||||||
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||||
}
|
}
|
||||||
|
@ -461,22 +485,23 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
|
|
||||||
private fun fillPickedPaths(resultData: Intent, resultIntent: Intent) {
|
private fun fillPickedPaths(resultData: Intent, resultIntent: Intent) {
|
||||||
val paths = resultData.extras.getStringArrayList(PICKED_PATHS)
|
val paths = resultData.extras.getStringArrayList(PICKED_PATHS)
|
||||||
val uris = paths.map { Uri.fromFile(File(it)) } as ArrayList
|
val uris = paths.map { getFilePublicUri(File(it), BuildConfig.APPLICATION_ID) } as ArrayList
|
||||||
val clipData = ClipData("Attachment", arrayOf("image/*", "video/*"), ClipData.Item(uris.removeAt(0)))
|
val clipData = ClipData("Attachment", arrayOf("image/*", "video/*"), ClipData.Item(uris.removeAt(0)))
|
||||||
|
|
||||||
uris.forEach {
|
uris.forEach {
|
||||||
clipData.addItem(ClipData.Item(it))
|
clipData.addItem(ClipData.Item(it))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||||
resultIntent.clipData = clipData
|
resultIntent.clipData = clipData
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fillIntentPath(resultData: Intent, resultIntent: Intent) {
|
private fun fillIntentPath(resultData: Intent, resultIntent: Intent) {
|
||||||
val path = resultData.data.path
|
val path = resultData.data.path
|
||||||
val uri = Uri.fromFile(File(path))
|
val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID)
|
||||||
val type = File(path).getMimeType("image/jpeg")
|
val type = path.getMimeTypeFromPath()
|
||||||
resultIntent.setDataAndTypeAndNormalize(uri, type)
|
resultIntent.setDataAndTypeAndNormalize(uri, type)
|
||||||
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION
|
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun itemClicked(path: String) {
|
private fun itemClicked(path: String) {
|
||||||
|
@ -495,7 +520,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
putExtra(GET_IMAGE_INTENT, mIsPickImageIntent || mIsGetImageContentIntent)
|
putExtra(GET_IMAGE_INTENT, mIsPickImageIntent || mIsGetImageContentIntent)
|
||||||
putExtra(GET_VIDEO_INTENT, mIsPickVideoIntent || mIsGetVideoContentIntent)
|
putExtra(GET_VIDEO_INTENT, mIsPickVideoIntent || mIsGetVideoContentIntent)
|
||||||
putExtra(GET_ANY_INTENT, mIsGetAnyContentIntent)
|
putExtra(GET_ANY_INTENT, mIsGetAnyContentIntent)
|
||||||
putExtra(Intent.EXTRA_ALLOW_MULTIPLE, intent.getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false))
|
putExtra(Intent.EXTRA_ALLOW_MULTIPLE, mAllowPickingMultiple)
|
||||||
startActivityForResult(this, PICK_MEDIA)
|
startActivityForResult(this, PICK_MEDIA)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -631,6 +656,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
add(Release(125, R.string.release_125))
|
add(Release(125, R.string.release_125))
|
||||||
add(Release(127, R.string.release_127))
|
add(Release(127, R.string.release_127))
|
||||||
add(Release(133, R.string.release_133))
|
add(Release(133, R.string.release_133))
|
||||||
|
add(Release(136, R.string.release_136))
|
||||||
|
add(Release(137, R.string.release_137))
|
||||||
|
add(Release(138, R.string.release_138))
|
||||||
checkWhatsNew(this, BuildConfig.VERSION_CODE)
|
checkWhatsNew(this, BuildConfig.VERSION_CODE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,11 @@ import com.bumptech.glide.request.RequestOptions
|
||||||
import com.bumptech.glide.request.target.SimpleTarget
|
import com.bumptech.glide.request.target.SimpleTarget
|
||||||
import com.bumptech.glide.request.transition.Transition
|
import com.bumptech.glide.request.transition.Transition
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.reflect.TypeToken
|
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
|
import com.simplemobiletools.commons.helpers.REQUEST_EDIT_IMAGE
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.commons.views.MyScalableRecyclerView
|
import com.simplemobiletools.commons.views.MyScalableRecyclerView
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
|
@ -49,6 +50,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
private var mAllowPickingMultiple = false
|
private var mAllowPickingMultiple = false
|
||||||
private var mShowAll = false
|
private var mShowAll = false
|
||||||
private var mLoadedInitialPhotos = false
|
private var mLoadedInitialPhotos = false
|
||||||
|
private var mStoredUseEnglish = false
|
||||||
private var mStoredAnimateGifs = true
|
private var mStoredAnimateGifs = true
|
||||||
private var mStoredCropThumbnails = true
|
private var mStoredCropThumbnails = true
|
||||||
private var mStoredScrollHorizontally = true
|
private var mStoredScrollHorizontally = true
|
||||||
|
@ -74,11 +76,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
|
|
||||||
media_refresh_layout.setOnRefreshListener({ getMedia() })
|
media_refresh_layout.setOnRefreshListener({ getMedia() })
|
||||||
mPath = intent.getStringExtra(DIRECTORY)
|
mPath = intent.getStringExtra(DIRECTORY)
|
||||||
mStoredAnimateGifs = config.animateGifs
|
storeStateVariables()
|
||||||
mStoredCropThumbnails = config.cropThumbnails
|
|
||||||
mStoredScrollHorizontally = config.scrollHorizontally
|
|
||||||
mStoredTextColor = config.textColor
|
|
||||||
mShowAll = config.showAll
|
|
||||||
if (mShowAll)
|
if (mShowAll)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
||||||
|
|
||||||
|
@ -89,24 +87,26 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (mShowAll && mStoredAnimateGifs != config.animateGifs) {
|
if (mStoredUseEnglish != config.useEnglish) {
|
||||||
media_grid.adapter?.notifyDataSetChanged()
|
restartActivity()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mStoredAnimateGifs != config.animateGifs) {
|
||||||
|
getMediaAdapter()?.updateAnimateGifs(config.animateGifs)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mStoredCropThumbnails != config.cropThumbnails) {
|
if (mStoredCropThumbnails != config.cropThumbnails) {
|
||||||
media_grid.adapter?.notifyDataSetChanged()
|
getMediaAdapter()?.updateCropThumbnails(config.cropThumbnails)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mStoredScrollHorizontally != config.scrollHorizontally) {
|
if (mStoredScrollHorizontally != config.scrollHorizontally) {
|
||||||
(media_grid.adapter as? MediaAdapter)?.apply {
|
getMediaAdapter()?.updateScrollHorizontally(config.viewTypeFiles != VIEW_TYPE_LIST || !config.scrollHorizontally)
|
||||||
scrollVertically = config.viewTypeFiles == VIEW_TYPE_LIST || !config.scrollHorizontally
|
|
||||||
notifyDataSetChanged()
|
|
||||||
}
|
|
||||||
setupScrollDirection()
|
setupScrollDirection()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mStoredTextColor != config.textColor) {
|
if (mStoredTextColor != config.textColor) {
|
||||||
(media_grid.adapter as? MediaAdapter)?.updateTextColor(config.textColor)
|
getMediaAdapter()?.updateTextColor(config.textColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
tryloadGallery()
|
tryloadGallery()
|
||||||
|
@ -119,14 +119,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
mIsGettingMedia = false
|
mIsGettingMedia = false
|
||||||
media_refresh_layout.isRefreshing = false
|
media_refresh_layout.isRefreshing = false
|
||||||
mStoredAnimateGifs = config.animateGifs
|
storeStateVariables()
|
||||||
mStoredCropThumbnails = config.cropThumbnails
|
|
||||||
mStoredScrollHorizontally = config.scrollHorizontally
|
|
||||||
mStoredTextColor = config.textColor
|
|
||||||
media_grid.listener = null
|
media_grid.listener = null
|
||||||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||||
|
|
||||||
|
if (!mMedia.isEmpty()) {
|
||||||
mCurrAsyncTask?.stopFetching()
|
mCurrAsyncTask?.stopFetching()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
@ -135,17 +135,33 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
mMedia.clear()
|
mMedia.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun storeStateVariables() {
|
||||||
|
config.apply {
|
||||||
|
mStoredUseEnglish = useEnglish
|
||||||
|
mStoredAnimateGifs = animateGifs
|
||||||
|
mStoredCropThumbnails = cropThumbnails
|
||||||
|
mStoredScrollHorizontally = scrollHorizontally
|
||||||
|
mStoredTextColor = textColor
|
||||||
|
mShowAll = showAll
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun tryloadGallery() {
|
private fun tryloadGallery() {
|
||||||
if (hasWriteStoragePermission()) {
|
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||||
|
if (it) {
|
||||||
val dirName = getHumanizedFilename(mPath)
|
val dirName = getHumanizedFilename(mPath)
|
||||||
title = if (mShowAll) resources.getString(R.string.all_folders) else dirName
|
title = if (mShowAll) resources.getString(R.string.all_folders) else dirName
|
||||||
getMedia()
|
getMedia()
|
||||||
setupLayoutManager()
|
setupLayoutManager()
|
||||||
checkIfColorChanged()
|
checkIfColorChanged()
|
||||||
} else {
|
} else {
|
||||||
|
toast(R.string.no_storage_permissions)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getMediaAdapter() = media_grid.adapter as? MediaAdapter
|
||||||
|
|
||||||
private fun checkIfColorChanged() {
|
private fun checkIfColorChanged() {
|
||||||
if (media_grid.adapter != null && getRecyclerAdapter().primaryColor != config.primaryColor) {
|
if (media_grid.adapter != null && getRecyclerAdapter().primaryColor != config.primaryColor) {
|
||||||
|
@ -161,7 +177,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
|
|
||||||
val currAdapter = media_grid.adapter
|
val currAdapter = media_grid.adapter
|
||||||
if (currAdapter == null) {
|
if (currAdapter == null) {
|
||||||
media_grid.adapter = MediaAdapter(this, mMedia, this, mIsGetAnyIntent, mAllowPickingMultiple) {
|
media_grid.adapter = MediaAdapter(this, mMedia, this, mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent, mAllowPickingMultiple) {
|
||||||
itemClicked(it.path)
|
itemClicked(it.path)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -222,7 +238,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
|
findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
|
||||||
findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden
|
findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden
|
||||||
|
|
||||||
findItem(R.id.increase_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt < 10
|
findItem(R.id.increase_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt < MAX_COLUMN_COUNT
|
||||||
findItem(R.id.reduce_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt > 1
|
findItem(R.id.reduce_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt > 1
|
||||||
|
|
||||||
findItem(R.id.toggle_filename).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID
|
findItem(R.id.toggle_filename).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID
|
||||||
|
@ -340,8 +356,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
return
|
return
|
||||||
|
|
||||||
mIsGettingMedia = true
|
mIsGettingMedia = true
|
||||||
val token = object : TypeToken<List<Medium>>() {}.type
|
val media = getCachedMedia(mPath)
|
||||||
val media = Gson().fromJson<ArrayList<Medium>>(config.loadFolderMedia(mPath), token) ?: ArrayList(1)
|
|
||||||
if (media.isNotEmpty() && !mLoadedInitialPhotos) {
|
if (media.isNotEmpty() && !mLoadedInitialPhotos) {
|
||||||
gotMedia(media, true)
|
gotMedia(media, true)
|
||||||
} else {
|
} else {
|
||||||
|
@ -411,7 +426,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun zoomOut() {
|
override fun zoomOut() {
|
||||||
if (layoutManager.spanCount < 10) {
|
if (layoutManager.spanCount < MAX_COLUMN_COUNT) {
|
||||||
increaseColumnCount()
|
increaseColumnCount()
|
||||||
getRecyclerAdapter().actMode?.finish()
|
getRecyclerAdapter().actMode?.finish()
|
||||||
}
|
}
|
||||||
|
@ -499,10 +514,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
val file = File(path)
|
val file = File(path)
|
||||||
val isVideo = file.isVideoFast()
|
val isVideo = file.isVideoFast()
|
||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
openWith(file, false)
|
openFile(Uri.fromFile(file), false)
|
||||||
} else {
|
} else {
|
||||||
Intent(this, ViewPagerActivity::class.java).apply {
|
Intent(this, ViewPagerActivity::class.java).apply {
|
||||||
putExtra(MEDIUM, path)
|
putExtra(PATH, path)
|
||||||
putExtra(SHOW_ALL, mShowAll)
|
putExtra(SHOW_ALL, mShowAll)
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import android.os.Bundle
|
||||||
|
|
||||||
class PhotoActivity : PhotoVideoActivity() {
|
class PhotoActivity : PhotoVideoActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
PhotoVideoActivity.mIsVideo = false
|
mIsVideo = false
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,70 +1,72 @@
|
||||||
package com.simplemobiletools.gallery.activities
|
package com.simplemobiletools.gallery.activities
|
||||||
|
|
||||||
import android.Manifest
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
|
||||||
import android.database.Cursor
|
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.MediaStore
|
|
||||||
import android.support.v4.app.ActivityCompat
|
|
||||||
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 com.simplemobiletools.commons.extensions.hasWriteStoragePermission
|
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||||
|
import com.simplemobiletools.commons.extensions.getFilenameFromUri
|
||||||
|
import com.simplemobiletools.commons.extensions.getRealPathFromURI
|
||||||
import com.simplemobiletools.commons.extensions.scanPath
|
import com.simplemobiletools.commons.extensions.scanPath
|
||||||
import com.simplemobiletools.commons.extensions.toast
|
import com.simplemobiletools.commons.extensions.toast
|
||||||
|
import com.simplemobiletools.commons.helpers.IS_FROM_GALLERY
|
||||||
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
|
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.extensions.*
|
import com.simplemobiletools.gallery.extensions.*
|
||||||
import com.simplemobiletools.gallery.fragments.PhotoFragment
|
import com.simplemobiletools.gallery.fragments.PhotoFragment
|
||||||
import com.simplemobiletools.gallery.fragments.VideoFragment
|
import com.simplemobiletools.gallery.fragments.VideoFragment
|
||||||
import com.simplemobiletools.gallery.fragments.ViewPagerFragment
|
import com.simplemobiletools.gallery.fragments.ViewPagerFragment
|
||||||
import com.simplemobiletools.gallery.helpers.IS_FROM_GALLERY
|
|
||||||
import com.simplemobiletools.gallery.helpers.IS_VIEW_INTENT
|
import com.simplemobiletools.gallery.helpers.IS_VIEW_INTENT
|
||||||
import com.simplemobiletools.gallery.helpers.MEDIUM
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
|
import com.simplemobiletools.gallery.helpers.PATH
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import kotlinx.android.synthetic.main.fragment_holder.*
|
import kotlinx.android.synthetic.main.fragment_holder.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentListener {
|
open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentListener {
|
||||||
private val STORAGE_PERMISSION = 1
|
|
||||||
private var mMedium: Medium? = null
|
private var mMedium: Medium? = null
|
||||||
private var mIsFullScreen = false
|
private var mIsFullScreen = false
|
||||||
private var mIsFromGallery = false
|
private var mIsFromGallery = false
|
||||||
private var mFragment: ViewPagerFragment? = null
|
private var mFragment: ViewPagerFragment? = null
|
||||||
|
private var mUri: Uri? = null
|
||||||
|
|
||||||
lateinit var mUri: Uri
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
var mIsVideo = false
|
var mIsVideo = false
|
||||||
}
|
|
||||||
|
|
||||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.fragment_holder)
|
setContentView(R.layout.fragment_holder)
|
||||||
|
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||||
if (hasWriteStoragePermission()) {
|
if (it) {
|
||||||
checkIntent(savedInstanceState)
|
checkIntent(savedInstanceState)
|
||||||
} else {
|
} else {
|
||||||
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE), STORAGE_PERMISSION)
|
toast(R.string.no_storage_permissions)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkIntent(savedInstanceState: Bundle? = null) {
|
private fun checkIntent(savedInstanceState: Bundle? = null) {
|
||||||
mUri = intent.data ?: return
|
mUri = intent.data ?: return
|
||||||
|
if (intent.extras?.containsKey(REAL_FILE_PATH) == true) {
|
||||||
|
mUri = intent.extras.get(REAL_FILE_PATH) as Uri
|
||||||
|
}
|
||||||
|
|
||||||
mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false)
|
mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false)
|
||||||
|
|
||||||
if (mUri.scheme == "file") {
|
if (mUri!!.scheme == "file") {
|
||||||
scanPath(mUri.path) {}
|
scanPath(mUri!!.path) {}
|
||||||
sendViewPagerIntent(mUri.path)
|
sendViewPagerIntent(mUri!!.path)
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
val path = applicationContext.getRealPathFromURI(mUri) ?: ""
|
val path = applicationContext.getRealPathFromURI(mUri!!) ?: ""
|
||||||
scanPath(mUri.path) {}
|
if (path != mUri.toString() && path.isNotEmpty()) {
|
||||||
if (path.isNotEmpty()) {
|
scanPath(mUri!!.path) {}
|
||||||
sendViewPagerIntent(path)
|
sendViewPagerIntent(path)
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
|
@ -74,7 +76,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
showSystemUI()
|
showSystemUI()
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
val file = File(mUri.toString())
|
val file = File(mUri.toString())
|
||||||
mMedium = Medium(file.name, mUri.toString(), mIsVideo, 0, 0, file.length())
|
mMedium = Medium(getFilenameFromUri(mUri!!), mUri.toString(), mIsVideo, 0, 0, file.length())
|
||||||
|
title = mMedium!!.name
|
||||||
bundle.putSerializable(MEDIUM, mMedium)
|
bundle.putSerializable(MEDIUM, mMedium)
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
|
@ -84,22 +87,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
supportFragmentManager.beginTransaction().replace(R.id.fragment_holder, mFragment).commit()
|
supportFragmentManager.beginTransaction().replace(R.id.fragment_holder, mFragment).commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.darkBackground)
|
if (config.darkBackground) {
|
||||||
fragment_holder.background = ColorDrawable(Color.BLACK)
|
fragment_holder.background = ColorDrawable(Color.BLACK)
|
||||||
|
|
||||||
val proj = arrayOf(MediaStore.Images.Media.TITLE)
|
|
||||||
var cursor: Cursor? = null
|
|
||||||
try {
|
|
||||||
cursor = contentResolver.query(mUri, proj, null, null, null)
|
|
||||||
if (cursor != null && cursor.count != 0) {
|
|
||||||
val columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.TITLE)
|
|
||||||
cursor.moveToFirst()
|
|
||||||
title = cursor.getString(columnIndex)
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
title = mMedium?.name ?: ""
|
|
||||||
} finally {
|
|
||||||
cursor?.close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.decorView.setOnSystemUiVisibilityChangeListener { visibility ->
|
window.decorView.setOnSystemUiVisibilityChangeListener { visibility ->
|
||||||
|
@ -113,24 +102,11 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))
|
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
|
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
|
||||||
|
|
||||||
if (requestCode == STORAGE_PERMISSION) {
|
|
||||||
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
|
||||||
checkIntent()
|
|
||||||
} else {
|
|
||||||
toast(R.string.no_storage_permissions)
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun sendViewPagerIntent(path: String) {
|
private fun sendViewPagerIntent(path: String) {
|
||||||
Intent(this, ViewPagerActivity::class.java).apply {
|
Intent(this, ViewPagerActivity::class.java).apply {
|
||||||
putExtra(IS_VIEW_INTENT, true)
|
putExtra(IS_VIEW_INTENT, true)
|
||||||
putExtra(IS_FROM_GALLERY, mIsFromGallery)
|
putExtra(IS_FROM_GALLERY, mIsFromGallery)
|
||||||
putExtra(MEDIUM, path)
|
putExtra(PATH, path)
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +115,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
menuInflater.inflate(R.menu.photo_video_menu, menu)
|
menuInflater.inflate(R.menu.photo_video_menu, menu)
|
||||||
|
|
||||||
menu.findItem(R.id.menu_set_as).isVisible = mMedium?.isImage() == true
|
menu.findItem(R.id.menu_set_as).isVisible = mMedium?.isImage() == true
|
||||||
menu.findItem(R.id.menu_edit).isVisible = mMedium?.isImage() == true
|
menu.findItem(R.id.menu_edit).isVisible = mMedium?.isImage() == true && mUri?.scheme == "file"
|
||||||
|
menu.findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file"
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -149,15 +126,20 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
return true
|
return true
|
||||||
|
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.menu_set_as -> trySetAs(File(mMedium!!.path))
|
R.id.menu_set_as -> setAs(mUri!!)
|
||||||
R.id.menu_open_with -> openWith(File(mMedium!!.path))
|
R.id.menu_open_with -> openFile(mUri!!, true)
|
||||||
R.id.menu_share -> shareUri(mMedium!!, mUri)
|
R.id.menu_share -> shareUri(mUri!!)
|
||||||
R.id.menu_edit -> openFileEditor(File(mMedium!!.path))
|
R.id.menu_edit -> openEditor(mUri!!)
|
||||||
|
R.id.menu_properties -> showProperties()
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showProperties() {
|
||||||
|
PropertiesDialog(this, mUri!!.path)
|
||||||
|
}
|
||||||
|
|
||||||
override fun fragmentClicked() {
|
override fun fragmentClicked() {
|
||||||
mIsFullScreen = !mIsFullScreen
|
mIsFullScreen = !mIsFullScreen
|
||||||
if (mIsFullScreen) {
|
if (mIsFullScreen) {
|
||||||
|
|
|
@ -6,17 +6,21 @@ 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
|
||||||
import com.simplemobiletools.commons.dialogs.SecurityDialog
|
import com.simplemobiletools.commons.dialogs.SecurityDialog
|
||||||
|
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||||
import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection
|
import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||||
|
import com.simplemobiletools.commons.extensions.useEnglishToggled
|
||||||
import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT
|
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.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
|
import com.simplemobiletools.gallery.dialogs.ManageExtendedDetailsDialog
|
||||||
import com.simplemobiletools.gallery.extensions.config
|
import com.simplemobiletools.gallery.extensions.config
|
||||||
import com.simplemobiletools.gallery.helpers.ROTATE_BY_ASPECT_RATIO
|
import com.simplemobiletools.gallery.helpers.ROTATE_BY_ASPECT_RATIO
|
||||||
import com.simplemobiletools.gallery.helpers.ROTATE_BY_DEVICE_ROTATION
|
import com.simplemobiletools.gallery.helpers.ROTATE_BY_DEVICE_ROTATION
|
||||||
import com.simplemobiletools.gallery.helpers.ROTATE_BY_SYSTEM_SETTING
|
import com.simplemobiletools.gallery.helpers.ROTATE_BY_SYSTEM_SETTING
|
||||||
import kotlinx.android.synthetic.main.activity_settings.*
|
import kotlinx.android.synthetic.main.activity_settings.*
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
class SettingsActivity : SimpleActivity() {
|
class SettingsActivity : SimpleActivity() {
|
||||||
lateinit var res: Resources
|
lateinit var res: Resources
|
||||||
|
@ -31,6 +35,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
|
setupUseEnglish()
|
||||||
setupManageIncludedFolders()
|
setupManageIncludedFolders()
|
||||||
setupManageExcludedFolders()
|
setupManageExcludedFolders()
|
||||||
setupShowHiddenFolders()
|
setupShowHiddenFolders()
|
||||||
|
@ -45,8 +50,13 @@ class SettingsActivity : SimpleActivity() {
|
||||||
setupHideSystemUI()
|
setupHideSystemUI()
|
||||||
setupReplaceShare()
|
setupReplaceShare()
|
||||||
setupPasswordProtection()
|
setupPasswordProtection()
|
||||||
|
setupAppPasswordProtection()
|
||||||
setupDeleteEmptyFolders()
|
setupDeleteEmptyFolders()
|
||||||
setupAllowVideoGestures()
|
setupAllowVideoGestures()
|
||||||
|
setupShowMediaCount()
|
||||||
|
setupKeepLastModified()
|
||||||
|
setupShowExtendedDetails()
|
||||||
|
setupManageExtendedDetails()
|
||||||
updateTextColors(settings_holder)
|
updateTextColors(settings_holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,6 +66,16 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupUseEnglish() {
|
||||||
|
settings_use_english_holder.beVisibleIf(Locale.getDefault().language != "en")
|
||||||
|
settings_use_english.isChecked = config.useEnglish
|
||||||
|
settings_use_english_holder.setOnClickListener {
|
||||||
|
settings_use_english.toggle()
|
||||||
|
config.useEnglish = settings_use_english.isChecked
|
||||||
|
useEnglishToggled()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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))
|
||||||
|
@ -162,7 +182,8 @@ class SettingsActivity : SimpleActivity() {
|
||||||
settings_password_protection.isChecked = config.isPasswordProtectionOn
|
settings_password_protection.isChecked = config.isPasswordProtectionOn
|
||||||
settings_password_protection_holder.setOnClickListener {
|
settings_password_protection_holder.setOnClickListener {
|
||||||
val tabToShow = if (config.isPasswordProtectionOn) config.protectionType else SHOW_ALL_TABS
|
val tabToShow = if (config.isPasswordProtectionOn) config.protectionType else SHOW_ALL_TABS
|
||||||
SecurityDialog(this, config.passwordHash, tabToShow) { hash, type ->
|
SecurityDialog(this, config.passwordHash, tabToShow) { hash, type, success ->
|
||||||
|
if (success) {
|
||||||
val hasPasswordProtection = config.isPasswordProtectionOn
|
val hasPasswordProtection = config.isPasswordProtectionOn
|
||||||
settings_password_protection.isChecked = !hasPasswordProtection
|
settings_password_protection.isChecked = !hasPasswordProtection
|
||||||
config.isPasswordProtectionOn = !hasPasswordProtection
|
config.isPasswordProtectionOn = !hasPasswordProtection
|
||||||
|
@ -177,6 +198,29 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupAppPasswordProtection() {
|
||||||
|
settings_app_password_protection.isChecked = config.appPasswordProtectionOn
|
||||||
|
settings_app_password_protection_holder.setOnClickListener {
|
||||||
|
val tabToShow = if (config.appPasswordProtectionOn) config.appProtectionType else SHOW_ALL_TABS
|
||||||
|
SecurityDialog(this, config.appPasswordHash, tabToShow) { hash, type, success ->
|
||||||
|
if (success) {
|
||||||
|
val hasPasswordProtection = config.appPasswordProtectionOn
|
||||||
|
settings_app_password_protection.isChecked = !hasPasswordProtection
|
||||||
|
config.appPasswordProtectionOn = !hasPasswordProtection
|
||||||
|
config.appPasswordHash = if (hasPasswordProtection) "" else hash
|
||||||
|
config.appProtectionType = type
|
||||||
|
|
||||||
|
if (config.appPasswordProtectionOn) {
|
||||||
|
val confirmationTextId = if (config.appProtectionType == 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
|
||||||
|
@ -194,6 +238,22 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupShowMediaCount() {
|
||||||
|
settings_show_media_count.isChecked = config.showMediaCount
|
||||||
|
settings_show_media_count_holder.setOnClickListener {
|
||||||
|
settings_show_media_count.toggle()
|
||||||
|
config.showMediaCount = settings_show_media_count.isChecked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupKeepLastModified() {
|
||||||
|
settings_keep_last_modified.isChecked = config.keepLastModified
|
||||||
|
settings_keep_last_modified_holder.setOnClickListener {
|
||||||
|
settings_keep_last_modified.toggle()
|
||||||
|
config.keepLastModified = settings_keep_last_modified.isChecked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupScreenRotation() {
|
private fun setupScreenRotation() {
|
||||||
settings_screen_rotation.text = getScreenRotationText()
|
settings_screen_rotation.text = getScreenRotationText()
|
||||||
settings_screen_rotation_holder.setOnClickListener {
|
settings_screen_rotation_holder.setOnClickListener {
|
||||||
|
@ -214,4 +274,24 @@ class SettingsActivity : SimpleActivity() {
|
||||||
ROTATE_BY_DEVICE_ROTATION -> R.string.screen_rotation_device_rotation
|
ROTATE_BY_DEVICE_ROTATION -> R.string.screen_rotation_device_rotation
|
||||||
else -> R.string.screen_rotation_aspect_ratio
|
else -> R.string.screen_rotation_aspect_ratio
|
||||||
})
|
})
|
||||||
|
|
||||||
|
private fun setupShowExtendedDetails() {
|
||||||
|
settings_show_extended_details.isChecked = config.showExtendedDetails
|
||||||
|
settings_show_extended_details_holder.setOnClickListener {
|
||||||
|
settings_show_extended_details.toggle()
|
||||||
|
config.showExtendedDetails = settings_show_extended_details.isChecked
|
||||||
|
settings_manage_extended_details_holder.beVisibleIf(config.showExtendedDetails)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupManageExtendedDetails() {
|
||||||
|
settings_manage_extended_details_holder.beVisibleIf(config.showExtendedDetails)
|
||||||
|
settings_manage_extended_details_holder.setOnClickListener {
|
||||||
|
ManageExtendedDetailsDialog(this) {
|
||||||
|
if (config.extendedDetails == 0) {
|
||||||
|
settings_show_extended_details_holder.callOnClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.os.Bundle
|
||||||
class VideoActivity : PhotoVideoActivity() {
|
class VideoActivity : PhotoVideoActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
PhotoVideoActivity.mIsVideo = true
|
mIsVideo = true
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,18 @@ import android.support.v4.view.ViewPager
|
||||||
import android.util.DisplayMetrics
|
import android.util.DisplayMetrics
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.animation.DecelerateInterpolator
|
import android.view.animation.DecelerateInterpolator
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
|
||||||
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RenameItemDialog
|
import com.simplemobiletools.commons.dialogs.RenameItemDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.commons.helpers.IS_FROM_GALLERY
|
||||||
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
|
import com.simplemobiletools.commons.helpers.REQUEST_EDIT_IMAGE
|
||||||
|
import com.simplemobiletools.commons.helpers.REQUEST_SET_AS
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.MediaActivity.Companion.mMedia
|
import com.simplemobiletools.gallery.activities.MediaActivity.Companion.mMedia
|
||||||
import com.simplemobiletools.gallery.adapters.MyPagerAdapter
|
import com.simplemobiletools.gallery.adapters.MyPagerAdapter
|
||||||
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
||||||
|
import com.simplemobiletools.gallery.dialogs.DeleteWithRememberDialog
|
||||||
import com.simplemobiletools.gallery.dialogs.SaveAsDialog
|
import com.simplemobiletools.gallery.dialogs.SaveAsDialog
|
||||||
import com.simplemobiletools.gallery.dialogs.SlideshowDialog
|
import com.simplemobiletools.gallery.dialogs.SlideshowDialog
|
||||||
import com.simplemobiletools.gallery.extensions.*
|
import com.simplemobiletools.gallery.extensions.*
|
||||||
|
@ -40,12 +44,11 @@ import com.simplemobiletools.gallery.fragments.ViewPagerFragment
|
||||||
import com.simplemobiletools.gallery.helpers.*
|
import com.simplemobiletools.gallery.helpers.*
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import kotlinx.android.synthetic.main.activity_medium.*
|
import kotlinx.android.synthetic.main.activity_medium.*
|
||||||
import java.io.File
|
import java.io.*
|
||||||
import java.io.OutputStream
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, ViewPagerFragment.FragmentListener {
|
class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, ViewPagerFragment.FragmentListener {
|
||||||
lateinit var mOrientationEventListener: OrientationEventListener
|
private var mOrientationEventListener: OrientationEventListener? = null
|
||||||
private var mPath = ""
|
private var mPath = ""
|
||||||
private var mDirectory = ""
|
private var mDirectory = ""
|
||||||
|
|
||||||
|
@ -53,6 +56,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
private var mPos = -1
|
private var mPos = -1
|
||||||
private var mShowAll = false
|
private var mShowAll = false
|
||||||
private var mIsSlideshowActive = false
|
private var mIsSlideshowActive = false
|
||||||
|
private var mSkipConfirmationDialog = false
|
||||||
private var mRotationDegrees = 0f
|
private var mRotationDegrees = 0f
|
||||||
private var mLastHandledOrientation = 0
|
private var mLastHandledOrientation = 0
|
||||||
private var mPrevHashcode = 0
|
private var mPrevHashcode = 0
|
||||||
|
@ -62,6 +66,9 @@ 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 mStoredUseEnglish = false
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
var screenWidth = 0
|
var screenWidth = 0
|
||||||
|
@ -72,11 +79,66 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_medium)
|
setContentView(R.layout.activity_medium)
|
||||||
|
|
||||||
if (!hasWriteStoragePermission()) {
|
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||||
|
if (it) {
|
||||||
|
initViewPager()
|
||||||
|
} else {
|
||||||
|
toast(R.string.no_storage_permissions)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
storeStateVariables()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
if (!hasPermission(PERMISSION_WRITE_STORAGE)) {
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mStoredUseEnglish != config.useEnglish) {
|
||||||
|
restartActivity()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))
|
||||||
|
|
||||||
|
if (config.maxBrightness) {
|
||||||
|
val attributes = window.attributes
|
||||||
|
attributes.screenBrightness = 1f
|
||||||
|
window.attributes = attributes
|
||||||
|
}
|
||||||
|
|
||||||
|
setupRotation()
|
||||||
|
invalidateOptionsMenu()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
super.onPause()
|
||||||
|
mOrientationEventListener?.disable()
|
||||||
|
stopSlideshow()
|
||||||
|
storeStateVariables()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
||||||
|
config.temporarilyShowHidden = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.isThirdPartyIntent) {
|
||||||
|
config.isThirdPartyIntent = false
|
||||||
|
|
||||||
|
if (intent.extras == null || !intent.getBooleanExtra(IS_FROM_GALLERY, false)) {
|
||||||
|
mMedia.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initViewPager() {
|
||||||
|
setupOrientationEventListener()
|
||||||
measureScreen()
|
measureScreen()
|
||||||
val uri = intent.data
|
val uri = intent.data
|
||||||
if (uri != null) {
|
if (uri != null) {
|
||||||
|
@ -92,7 +154,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
mPath = intent.getStringExtra(MEDIUM)
|
mPath = intent.getStringExtra(PATH)
|
||||||
mShowAll = config.showAll
|
mShowAll = config.showAll
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e)
|
||||||
|
@ -122,21 +184,16 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
mDirectory = File(mPath).parent
|
mDirectory = File(mPath).parent
|
||||||
title = mPath.getFilenameFromPath()
|
title = mPath.getFilenameFromPath()
|
||||||
|
|
||||||
view_pager.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
view_pager.onGlobalLayout {
|
||||||
override fun onGlobalLayout() {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
||||||
view_pager.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && isDestroyed)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (mMedia.isNotEmpty()) {
|
if (mMedia.isNotEmpty()) {
|
||||||
gotMedia(mMedia)
|
gotMedia(mMedia)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
reloadViewPager()
|
reloadViewPager()
|
||||||
scanPath(mPath) {}
|
scanPath(mPath) {}
|
||||||
setupOrientationEventListener()
|
|
||||||
|
|
||||||
if (config.darkBackground)
|
if (config.darkBackground)
|
||||||
view_pager.background = ColorDrawable(Color.BLACK)
|
view_pager.background = ColorDrawable(Color.BLACK)
|
||||||
|
@ -153,18 +210,15 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
private fun setupRotation() {
|
||||||
super.onDestroy()
|
if (mIsOrientationLocked) {
|
||||||
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||||
config.temporarilyShowHidden = false
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LOCKED
|
||||||
}
|
|
||||||
|
|
||||||
if (config.isThirdPartyIntent) {
|
|
||||||
config.isThirdPartyIntent = false
|
|
||||||
|
|
||||||
if (intent.extras == null || !intent.getBooleanExtra(IS_FROM_GALLERY, false)) {
|
|
||||||
mMedia.clear()
|
|
||||||
}
|
}
|
||||||
|
} else if (config.screenRotation == ROTATE_BY_DEVICE_ROTATION && mOrientationEventListener?.canDetectOrientation() == true) {
|
||||||
|
mOrientationEventListener?.enable()
|
||||||
|
} else if (config.screenRotation == ROTATE_BY_SYSTEM_SETTING) {
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,12 +226,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
mOrientationEventListener = object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_NORMAL) {
|
mOrientationEventListener = object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_NORMAL) {
|
||||||
override fun onOrientationChanged(orientation: Int) {
|
override fun onOrientationChanged(orientation: Int) {
|
||||||
val currOrient = when (orientation) {
|
val currOrient = when (orientation) {
|
||||||
in 45..134 -> ORIENT_LANDSCAPE_RIGHT
|
in 60..134 -> ORIENT_LANDSCAPE_RIGHT
|
||||||
in 225..314 -> ORIENT_LANDSCAPE_LEFT
|
in 225..299 -> ORIENT_LANDSCAPE_LEFT
|
||||||
else -> ORIENT_PORTRAIT
|
else -> ORIENT_PORTRAIT
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLastHandledOrientation != currOrient) {
|
if (!mIsOrientationLocked && mLastHandledOrientation != currOrient) {
|
||||||
mLastHandledOrientation = currOrient
|
mLastHandledOrientation = currOrient
|
||||||
|
|
||||||
requestedOrientation = when (currOrient) {
|
requestedOrientation = when (currOrient) {
|
||||||
|
@ -190,34 +244,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
if (!hasWriteStoragePermission()) {
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))
|
|
||||||
|
|
||||||
if (config.maxBrightness) {
|
|
||||||
val attributes = window.attributes
|
|
||||||
attributes.screenBrightness = 1f
|
|
||||||
window.attributes = attributes
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.screenRotation == ROTATE_BY_DEVICE_ROTATION && mOrientationEventListener.canDetectOrientation()) {
|
|
||||||
mOrientationEventListener.enable()
|
|
||||||
} else if (config.screenRotation == ROTATE_BY_SYSTEM_SETTING) {
|
|
||||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
|
||||||
}
|
|
||||||
|
|
||||||
invalidateOptionsMenu()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPause() {
|
|
||||||
super.onPause()
|
|
||||||
mOrientationEventListener.disable()
|
|
||||||
stopSlideshow()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
menuInflater.inflate(R.menu.menu_viewpager, menu)
|
menuInflater.inflate(R.menu.menu_viewpager, menu)
|
||||||
val currentMedium = getCurrentMedium() ?: return true
|
val currentMedium = getCurrentMedium() ?: return true
|
||||||
|
@ -225,12 +251,17 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
menu.apply {
|
menu.apply {
|
||||||
findItem(R.id.menu_share_1).isVisible = !config.replaceShare
|
findItem(R.id.menu_share_1).isVisible = !config.replaceShare
|
||||||
findItem(R.id.menu_share_2).isVisible = config.replaceShare
|
findItem(R.id.menu_share_2).isVisible = config.replaceShare
|
||||||
findItem(R.id.menu_set_as).isVisible = currentMedium.isImage()
|
|
||||||
findItem(R.id.menu_edit).isVisible = currentMedium.isImage()
|
|
||||||
findItem(R.id.menu_rotate).isVisible = currentMedium.isImage()
|
findItem(R.id.menu_rotate).isVisible = currentMedium.isImage()
|
||||||
findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0f
|
findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0f
|
||||||
findItem(R.id.menu_hide).isVisible = !currentMedium.name.startsWith('.')
|
findItem(R.id.menu_hide).isVisible = !currentMedium.name.startsWith('.')
|
||||||
findItem(R.id.menu_unhide).isVisible = currentMedium.name.startsWith('.')
|
findItem(R.id.menu_unhide).isVisible = currentMedium.name.startsWith('.')
|
||||||
|
findItem(R.id.menu_lock_orientation).title = getString(if (mIsOrientationLocked) R.string.unlock_orientation else R.string.lock_orientation)
|
||||||
|
findItem(R.id.menu_rotate).setShowAsAction(
|
||||||
|
if (mRotationDegrees != 0f) {
|
||||||
|
MenuItem.SHOW_AS_ACTION_ALWAYS
|
||||||
|
} else {
|
||||||
|
MenuItem.SHOW_AS_ACTION_IF_ROOM
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
@ -241,34 +272,40 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
return true
|
return true
|
||||||
|
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.menu_set_as -> trySetAs(getCurrentFile())
|
R.id.menu_set_as -> setAs(Uri.fromFile(getCurrentFile()))
|
||||||
R.id.slideshow -> initSlideshow()
|
R.id.menu_slideshow -> initSlideshow()
|
||||||
R.id.menu_copy_to -> copyMoveTo(true)
|
R.id.menu_copy_to -> copyMoveTo(true)
|
||||||
R.id.menu_move_to -> copyMoveTo(false)
|
R.id.menu_move_to -> copyMoveTo(false)
|
||||||
R.id.menu_open_with -> openWith(getCurrentFile())
|
R.id.menu_open_with -> openFile(Uri.fromFile(getCurrentFile()), true)
|
||||||
R.id.menu_hide -> toggleFileVisibility(true)
|
R.id.menu_hide -> toggleFileVisibility(true)
|
||||||
R.id.menu_unhide -> toggleFileVisibility(false)
|
R.id.menu_unhide -> toggleFileVisibility(false)
|
||||||
R.id.menu_share_1 -> shareMedium(getCurrentMedium()!!)
|
R.id.menu_share_1 -> shareMedium(getCurrentMedium()!!)
|
||||||
R.id.menu_share_2 -> shareMedium(getCurrentMedium()!!)
|
R.id.menu_share_2 -> shareMedium(getCurrentMedium()!!)
|
||||||
R.id.menu_delete -> askConfirmDelete()
|
R.id.menu_delete -> checkDeleteConfirmation()
|
||||||
R.id.menu_rename -> renameFile()
|
R.id.menu_rename -> renameFile()
|
||||||
R.id.menu_edit -> openFileEditor(getCurrentFile())
|
R.id.menu_edit -> openEditor(Uri.fromFile(getCurrentFile()))
|
||||||
R.id.menu_properties -> showProperties()
|
R.id.menu_properties -> showProperties()
|
||||||
R.id.show_on_map -> showOnMap()
|
R.id.menu_show_on_map -> showOnMap()
|
||||||
R.id.menu_rotate -> rotateImage()
|
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_lock_orientation -> toggleLockOrientation()
|
||||||
R.id.menu_save_as -> saveImageAs()
|
R.id.menu_save_as -> saveImageAs()
|
||||||
R.id.settings -> launchSettings()
|
R.id.menu_settings -> launchSettings()
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun storeStateVariables() {
|
||||||
|
mStoredUseEnglish = config.useEnglish
|
||||||
|
}
|
||||||
|
|
||||||
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 (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
||||||
view_pager.apply {
|
view_pager.apply {
|
||||||
adapter = pagerAdapter
|
adapter = pagerAdapter
|
||||||
adapter!!.notifyDataSetChanged()
|
|
||||||
currentItem = mPos
|
currentItem = mPos
|
||||||
addOnPageChangeListener(this@ViewPagerActivity)
|
addOnPageChangeListener(this@ViewPagerActivity)
|
||||||
}
|
}
|
||||||
|
@ -283,12 +320,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun startSlideshow() {
|
private fun startSlideshow() {
|
||||||
if (getMediaForSlideshow()) {
|
if (getMediaForSlideshow()) {
|
||||||
view_pager.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
view_pager.onGlobalLayout {
|
||||||
override fun onGlobalLayout() {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
||||||
view_pager.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && isDestroyed)
|
|
||||||
return
|
|
||||||
|
|
||||||
hideSystemUI()
|
hideSystemUI()
|
||||||
mSlideshowInterval = config.slideshowInterval
|
mSlideshowInterval = config.slideshowInterval
|
||||||
mSlideshowMoveBackwards = config.slideshowMoveBackwards
|
mSlideshowMoveBackwards = config.slideshowMoveBackwards
|
||||||
|
@ -296,7 +329,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||||
scheduleSwipe()
|
scheduleSwipe()
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,10 +360,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
animator.addUpdateListener(object : ValueAnimator.AnimatorUpdateListener {
|
animator.addUpdateListener(object : ValueAnimator.AnimatorUpdateListener {
|
||||||
var oldDragPosition = 0
|
var oldDragPosition = 0
|
||||||
override fun onAnimationUpdate(animation: ValueAnimator) {
|
override fun onAnimationUpdate(animation: ValueAnimator) {
|
||||||
|
if (view_pager?.isFakeDragging == true) {
|
||||||
val dragPosition = animation.animatedValue as Int
|
val dragPosition = animation.animatedValue as Int
|
||||||
val dragOffset = dragPosition - oldDragPosition
|
val dragOffset = dragPosition - oldDragPosition
|
||||||
oldDragPosition = dragPosition
|
oldDragPosition = dragPosition
|
||||||
view_pager?.fakeDragBy(dragOffset * (if (forward) 1f else -1f))
|
view_pager.fakeDragBy(dragOffset * (if (forward) 1f else -1f))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -436,62 +471,122 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun rotateImage() {
|
private fun rotateImage(degrees: Int) {
|
||||||
mRotationDegrees = (mRotationDegrees + 90) % 360
|
mRotationDegrees = (mRotationDegrees + degrees) % 360
|
||||||
getCurrentFragment()?.let {
|
getCurrentFragment()?.let {
|
||||||
(it as? PhotoFragment)?.rotateImageViewBy(mRotationDegrees)
|
(it as? PhotoFragment)?.rotateImageViewBy(mRotationDegrees)
|
||||||
}
|
}
|
||||||
supportInvalidateOptionsMenu()
|
supportInvalidateOptionsMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun toggleLockOrientation() {
|
||||||
|
mIsOrientationLocked = !mIsOrientationLocked
|
||||||
|
if (mIsOrientationLocked) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LOCKED
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setupRotation()
|
||||||
|
}
|
||||||
|
invalidateOptionsMenu()
|
||||||
|
}
|
||||||
|
|
||||||
private fun saveImageAs() {
|
private fun saveImageAs() {
|
||||||
val currPath = getCurrentPath()
|
val currPath = getCurrentPath()
|
||||||
SaveAsDialog(this, currPath) {
|
SaveAsDialog(this, currPath, false) {
|
||||||
Thread({
|
Thread({
|
||||||
toast(R.string.saving)
|
|
||||||
val selectedFile = File(it)
|
val selectedFile = File(it)
|
||||||
val tmpFile = File(selectedFile.parent, ".tmp_${it.getFilenameFromPath()}")
|
handleSAFDialog(selectedFile) {
|
||||||
|
toast(R.string.saving)
|
||||||
|
val tmpFile = File(filesDir, ".tmp_${it.getFilenameFromPath()}")
|
||||||
try {
|
try {
|
||||||
val bitmap = BitmapFactory.decodeFile(currPath)
|
val bitmap = BitmapFactory.decodeFile(currPath)
|
||||||
getFileOutputStream(tmpFile) {
|
getFileOutputStream(tmpFile) {
|
||||||
if (it == null) {
|
if (it == null) {
|
||||||
toast(R.string.unknown_error_occurred)
|
toast(R.string.unknown_error_occurred)
|
||||||
deleteFile(tmpFile) {}
|
|
||||||
return@getFileOutputStream
|
return@getFileOutputStream
|
||||||
}
|
}
|
||||||
|
|
||||||
saveFile(tmpFile, bitmap, it)
|
val oldLastModified = getCurrentFile().lastModified()
|
||||||
if (needsStupidWritePermissions(selectedFile.absolutePath)) {
|
if (currPath.isJpg()) {
|
||||||
deleteFile(selectedFile) {}
|
saveRotation(getCurrentFile(), tmpFile)
|
||||||
|
} else {
|
||||||
|
saveFile(tmpFile, bitmap, it as FileOutputStream)
|
||||||
}
|
}
|
||||||
|
|
||||||
renameFile(tmpFile, selectedFile) {
|
if (tmpFile.length() > 0 && selectedFile.exists()) {
|
||||||
deleteFile(tmpFile) {}
|
deleteFile(selectedFile) {}
|
||||||
}
|
}
|
||||||
|
copyFile(tmpFile, selectedFile)
|
||||||
|
scanFile(selectedFile) {}
|
||||||
|
toast(R.string.file_saved)
|
||||||
|
|
||||||
|
if (config.keepLastModified) {
|
||||||
|
selectedFile.setLastModified(oldLastModified)
|
||||||
|
updateLastModified(selectedFile, oldLastModified)
|
||||||
|
}
|
||||||
|
|
||||||
|
it.flush()
|
||||||
|
it.close()
|
||||||
|
mRotationDegrees = 0f
|
||||||
|
invalidateOptionsMenu()
|
||||||
}
|
}
|
||||||
} catch (e: OutOfMemoryError) {
|
} catch (e: OutOfMemoryError) {
|
||||||
toast(R.string.out_of_memory_error)
|
toast(R.string.out_of_memory_error)
|
||||||
deleteFile(tmpFile) {}
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e)
|
||||||
|
} finally {
|
||||||
deleteFile(tmpFile) {}
|
deleteFile(tmpFile) {}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).start()
|
}).start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun saveFile(file: File, bitmap: Bitmap, out: OutputStream) {
|
private fun copyFile(source: File, destination: File) {
|
||||||
|
var inputStream: InputStream? = null
|
||||||
|
var out: OutputStream? = null
|
||||||
|
try {
|
||||||
|
val fileDocument = if (isPathOnSD(destination.absolutePath)) getFileDocument(destination.parent) else null
|
||||||
|
out = getFileOutputStreamSync(destination.absolutePath, source.getMimeType(), fileDocument)
|
||||||
|
inputStream = FileInputStream(source)
|
||||||
|
inputStream.copyTo(out!!)
|
||||||
|
} finally {
|
||||||
|
inputStream?.close()
|
||||||
|
out?.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun saveFile(file: File, bitmap: Bitmap, out: FileOutputStream) {
|
||||||
val matrix = Matrix()
|
val matrix = Matrix()
|
||||||
matrix.postRotate(mRotationDegrees)
|
matrix.postRotate(mRotationDegrees)
|
||||||
val bmp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true)
|
val bmp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true)
|
||||||
bmp.compress(file.getCompressionFormat(), 90, out)
|
bmp.compress(file.getCompressionFormat(), 90, out)
|
||||||
out.flush()
|
|
||||||
out.close()
|
|
||||||
toast(R.string.file_saved)
|
|
||||||
mRotationDegrees = 0f
|
|
||||||
invalidateOptionsMenu()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun saveRotation(source: File, destination: File) {
|
||||||
|
copyFile(source, destination)
|
||||||
|
val exif = ExifInterface(destination.absolutePath)
|
||||||
|
val orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL)
|
||||||
|
val orientationDegrees = (degreesForRotation(orientation) + mRotationDegrees) % 360
|
||||||
|
exif.setAttribute(ExifInterface.TAG_ORIENTATION, rotationFromDegrees(orientationDegrees))
|
||||||
|
exif.saveAttributes()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun degreesForRotation(orientation: Int) = when (orientation) {
|
||||||
|
ExifInterface.ORIENTATION_ROTATE_270 -> 270f
|
||||||
|
ExifInterface.ORIENTATION_ROTATE_180 -> 180f
|
||||||
|
ExifInterface.ORIENTATION_ROTATE_90 -> 90f
|
||||||
|
else -> 0f
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun rotationFromDegrees(degrees: Float) = when (degrees) {
|
||||||
|
270f -> ExifInterface.ORIENTATION_ROTATE_270
|
||||||
|
180f -> ExifInterface.ORIENTATION_ROTATE_180
|
||||||
|
90f -> ExifInterface.ORIENTATION_ROTATE_90
|
||||||
|
else -> ExifInterface.ORIENTATION_NORMAL
|
||||||
|
}.toString()
|
||||||
|
|
||||||
private fun isShowHiddenFlagNeeded(): Boolean {
|
private fun isShowHiddenFlagNeeded(): Boolean {
|
||||||
val file = File(mPath)
|
val file = File(mPath)
|
||||||
if (file.isHidden)
|
if (file.isHidden)
|
||||||
|
@ -515,9 +610,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
private fun getCurrentFragment() = (view_pager.adapter as MyPagerAdapter).getCurrentFragment(view_pager.currentItem)
|
private fun getCurrentFragment() = (view_pager.adapter as MyPagerAdapter).getCurrentFragment(view_pager.currentItem)
|
||||||
|
|
||||||
private fun showProperties() {
|
private fun showProperties() {
|
||||||
if (getCurrentMedium() != null)
|
if (getCurrentMedium() != null) {
|
||||||
PropertiesDialog(this, getCurrentPath(), false)
|
PropertiesDialog(this, getCurrentPath(), false)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun showOnMap() {
|
private fun showOnMap() {
|
||||||
val exif = ExifInterface(getCurrentPath())
|
val exif = ExifInterface(getCurrentPath())
|
||||||
|
@ -590,22 +686,36 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
super.onActivityResult(requestCode, resultCode, resultData)
|
super.onActivityResult(requestCode, resultCode, resultData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun checkDeleteConfirmation() {
|
||||||
|
if (mSkipConfirmationDialog) {
|
||||||
|
deleteConfirmed()
|
||||||
|
} else {
|
||||||
|
askConfirmDelete()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun askConfirmDelete() {
|
private fun askConfirmDelete() {
|
||||||
ConfirmationDialog(this) {
|
DeleteWithRememberDialog(this) {
|
||||||
|
mSkipConfirmationDialog = it
|
||||||
|
deleteConfirmed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun deleteConfirmed() {
|
||||||
deleteFileBg(File(getCurrentMedia()[mPos].path)) {
|
deleteFileBg(File(getCurrentMedia()[mPos].path)) {
|
||||||
reloadViewPager()
|
reloadViewPager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun isDirEmpty(media: ArrayList<Medium>): Boolean {
|
private fun isDirEmpty(media: ArrayList<Medium>): Boolean {
|
||||||
return if (media.isEmpty()) {
|
return if (media.isEmpty()) {
|
||||||
deleteDirectoryIfEmpty()
|
deleteDirectoryIfEmpty()
|
||||||
finish()
|
finish()
|
||||||
true
|
true
|
||||||
} else
|
} else {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun renameFile() {
|
private fun renameFile() {
|
||||||
RenameItemDialog(this, getCurrentPath()) {
|
RenameItemDialog(this, getCurrentPath()) {
|
||||||
|
@ -677,7 +787,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkOrientation() {
|
private fun checkOrientation() {
|
||||||
if (config.screenRotation == ROTATE_BY_ASPECT_RATIO) {
|
if (!mIsOrientationLocked && config.screenRotation == ROTATE_BY_ASPECT_RATIO) {
|
||||||
val res = getCurrentFile().getResolution()
|
val res = getCurrentFile().getResolution()
|
||||||
if (res.x > res.y) {
|
if (res.x > res.y) {
|
||||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||||
|
@ -716,11 +826,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getCurrentMedium(): Medium? {
|
private fun getCurrentMedium(): Medium? {
|
||||||
return if (getCurrentMedia().isEmpty() || mPos == -1)
|
return if (getCurrentMedia().isEmpty() || mPos == -1) {
|
||||||
null
|
null
|
||||||
else
|
} else {
|
||||||
getCurrentMedia()[Math.min(mPos, getCurrentMedia().size - 1)]
|
getCurrentMedia()[Math.min(mPos, getCurrentMedia().size - 1)]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun getCurrentMedia() = if (mAreSlideShowMediaVisible) mSlideshowMedia else mMedia
|
private fun getCurrentMedia() = if (mAreSlideShowMediaVisible) mSlideshowMedia else mMedia
|
||||||
|
|
||||||
|
@ -728,9 +839,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun getCurrentFile() = File(getCurrentPath())
|
private fun getCurrentFile() = File(getCurrentPath())
|
||||||
|
|
||||||
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
|
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPageSelected(position: Int) {
|
override fun onPageSelected(position: Int) {
|
||||||
if (view_pager.offscreenPageLimit == 1) {
|
if (view_pager.offscreenPageLimit == 1) {
|
||||||
|
@ -744,7 +853,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPageScrollStateChanged(state: Int) {
|
override fun onPageScrollStateChanged(state: Int) {
|
||||||
if (state == ViewPager.SCROLL_STATE_IDLE) {
|
if (state == ViewPager.SCROLL_STATE_IDLE && getCurrentMedium() != null) {
|
||||||
checkOrientation()
|
checkOrientation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,24 +30,30 @@ import java.util.*
|
||||||
class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Directory>, val listener: DirOperationsListener?, val isPickIntent: Boolean,
|
class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Directory>, val listener: DirOperationsListener?, val isPickIntent: Boolean,
|
||||||
val itemClick: (Directory) -> Unit) : RecyclerView.Adapter<DirectoryAdapter.ViewHolder>() {
|
val itemClick: (Directory) -> Unit) : RecyclerView.Adapter<DirectoryAdapter.ViewHolder>() {
|
||||||
|
|
||||||
val multiSelector = MultiSelector()
|
private val config = activity.config
|
||||||
val config = activity.config
|
|
||||||
val isListViewType = config.viewTypeFolders == VIEW_TYPE_LIST
|
|
||||||
|
|
||||||
var actMode: ActionMode? = null
|
var actMode: ActionMode? = null
|
||||||
var itemViews = SparseArray<View>()
|
|
||||||
val selectedPositions = HashSet<Int>()
|
|
||||||
var primaryColor = config.primaryColor
|
var primaryColor = config.primaryColor
|
||||||
var textColor = config.textColor
|
|
||||||
var pinnedFolders = config.pinnedFolders
|
private val multiSelector = MultiSelector()
|
||||||
var scrollVertically = !config.scrollHorizontally
|
private val isListViewType = config.viewTypeFolders == VIEW_TYPE_LIST
|
||||||
|
private var itemViews = SparseArray<View>()
|
||||||
|
private val selectedPositions = HashSet<Int>()
|
||||||
|
private var textColor = config.textColor
|
||||||
|
private var pinnedFolders = config.pinnedFolders
|
||||||
|
private var scrollHorizontally = config.scrollHorizontally
|
||||||
|
private var showMediaCount = config.showMediaCount
|
||||||
|
private var animateGifs = config.animateGifs
|
||||||
|
private var cropThumbnails = config.cropThumbnails
|
||||||
|
|
||||||
fun toggleItemSelection(select: Boolean, pos: Int) {
|
fun toggleItemSelection(select: Boolean, pos: Int) {
|
||||||
if (select) {
|
if (select) {
|
||||||
itemViews[pos]?.dir_check?.background?.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN)
|
if (itemViews[pos] != null) {
|
||||||
|
itemViews[pos].dir_check?.background?.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN)
|
||||||
selectedPositions.add(pos)
|
selectedPositions.add(pos)
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
selectedPositions.remove(pos)
|
selectedPositions.remove(pos)
|
||||||
|
}
|
||||||
|
|
||||||
itemViews[pos]?.dir_check?.beVisibleIf(select)
|
itemViews[pos]?.dir_check?.beVisibleIf(select)
|
||||||
|
|
||||||
|
@ -123,11 +129,12 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
var hiddenCnt = 0
|
var hiddenCnt = 0
|
||||||
var unhiddenCnt = 0
|
var unhiddenCnt = 0
|
||||||
selectedPositions.mapNotNull { dirs.getOrNull(it)?.path }.forEach {
|
selectedPositions.mapNotNull { dirs.getOrNull(it)?.path }.forEach {
|
||||||
if (File(it).containsNoMedia())
|
if (File(it).containsNoMedia()) {
|
||||||
hiddenCnt++
|
hiddenCnt++
|
||||||
else
|
} else {
|
||||||
unhiddenCnt++
|
unhiddenCnt++
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
||||||
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
||||||
|
@ -138,11 +145,12 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
var pinnedCnt = 0
|
var pinnedCnt = 0
|
||||||
var unpinnedCnt = 0
|
var unpinnedCnt = 0
|
||||||
selectedPositions.mapNotNull { dirs.getOrNull(it)?.path }.forEach {
|
selectedPositions.mapNotNull { dirs.getOrNull(it)?.path }.forEach {
|
||||||
if (pinnedFolders.contains(it))
|
if (pinnedFolders.contains(it)) {
|
||||||
pinnedCnt++
|
pinnedCnt++
|
||||||
else
|
} else {
|
||||||
unpinnedCnt++
|
unpinnedCnt++
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
menu.findItem(R.id.cab_pin).isVisible = unpinnedCnt > 0
|
menu.findItem(R.id.cab_pin).isVisible = unpinnedCnt > 0
|
||||||
menu.findItem(R.id.cab_unpin).isVisible = pinnedCnt > 0
|
menu.findItem(R.id.cab_unpin).isVisible = pinnedCnt > 0
|
||||||
|
@ -215,10 +223,11 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pinFolders(pin: Boolean) {
|
private fun pinFolders(pin: Boolean) {
|
||||||
if (pin)
|
if (pin) {
|
||||||
config.addPinnedFolders(getSelectedPaths())
|
config.addPinnedFolders(getSelectedPaths())
|
||||||
else
|
} else {
|
||||||
config.removePinnedFolders(getSelectedPaths())
|
config.removePinnedFolders(getSelectedPaths())
|
||||||
|
}
|
||||||
|
|
||||||
pinnedFolders = config.pinnedFolders
|
pinnedFolders = config.pinnedFolders
|
||||||
listener?.recheckPinnedFolders()
|
listener?.recheckPinnedFolders()
|
||||||
|
@ -255,7 +264,6 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
private fun askConfirmDelete() {
|
private fun askConfirmDelete() {
|
||||||
ConfirmationDialog(activity) {
|
ConfirmationDialog(activity) {
|
||||||
deleteFiles()
|
deleteFiles()
|
||||||
actMode?.finish()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,6 +302,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
.forEachIndexed { curIndex, i -> newItems.put(curIndex, itemViews[i]) }
|
.forEachIndexed { curIndex, i -> newItems.put(curIndex, itemViews[i]) }
|
||||||
|
|
||||||
itemViews = newItems
|
itemViews = newItems
|
||||||
|
actMode?.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,20 +311,30 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
return
|
return
|
||||||
|
|
||||||
val path = dirs[selectedPositions.first()].path
|
val path = dirs[selectedPositions.first()].path
|
||||||
var albumCovers = config.parseAlbumCovers()
|
|
||||||
|
|
||||||
if (useDefault) {
|
if (useDefault) {
|
||||||
albumCovers = albumCovers.filterNot { it.path == path } as ArrayList
|
val albumCovers = getAlbumCoversWithout(path)
|
||||||
storeCovers(albumCovers)
|
storeCovers(albumCovers)
|
||||||
} else {
|
} else {
|
||||||
|
pickMediumFrom(path, path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun pickMediumFrom(targetFolder: String, path: String) {
|
||||||
PickMediumDialog(activity, path) {
|
PickMediumDialog(activity, path) {
|
||||||
albumCovers = albumCovers.filterNot { it.path == path } as ArrayList
|
if (File(it).isDirectory) {
|
||||||
albumCovers.add(AlbumCover(path, it))
|
pickMediumFrom(targetFolder, it)
|
||||||
|
} else {
|
||||||
|
val albumCovers = getAlbumCoversWithout(path)
|
||||||
|
val cover = AlbumCover(targetFolder, it)
|
||||||
|
albumCovers.add(cover)
|
||||||
storeCovers(albumCovers)
|
storeCovers(albumCovers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getAlbumCoversWithout(path: String) = config.parseAlbumCovers().filterNot { it.path == path } as ArrayList
|
||||||
|
|
||||||
private fun storeCovers(albumCovers: ArrayList<AlbumCover>) {
|
private fun storeCovers(albumCovers: ArrayList<AlbumCover>) {
|
||||||
activity.config.albumCovers = Gson().toJson(albumCovers)
|
activity.config.albumCovers = Gson().toJson(albumCovers)
|
||||||
actMode?.finish()
|
actMode?.finish()
|
||||||
|
@ -336,7 +355,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
val dir = dirs[position]
|
val dir = dirs[position]
|
||||||
itemViews.put(position, holder.bindView(dir, pinnedFolders.contains(dir.path), scrollVertically, isListViewType, textColor))
|
itemViews.put(position, holder.bindView(dir, pinnedFolders.contains(dir.path), scrollHorizontally, isListViewType, textColor, showMediaCount, animateGifs, cropThumbnails))
|
||||||
toggleItemSelection(selectedPositions.contains(position), position)
|
toggleItemSelection(selectedPositions.contains(position), position)
|
||||||
holder.itemView.tag = holder
|
holder.itemView.tag = holder
|
||||||
}
|
}
|
||||||
|
@ -354,6 +373,26 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
actMode?.finish()
|
actMode?.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun updateAnimateGifs(animateGifs: Boolean) {
|
||||||
|
this.animateGifs = animateGifs
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateCropThumbnails(cropThumbnails: Boolean) {
|
||||||
|
this.cropThumbnails = cropThumbnails
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateShowMediaCount(showMediaCount: Boolean) {
|
||||||
|
this.showMediaCount = showMediaCount
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateScrollHorizontally(scrollHorizontally: Boolean) {
|
||||||
|
this.scrollHorizontally = scrollHorizontally
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
fun updateTextColor(textColor: Int) {
|
fun updateTextColor(textColor: Int) {
|
||||||
this.textColor = textColor
|
this.textColor = textColor
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
|
@ -401,14 +440,16 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
||||||
class ViewHolder(val view: View, val adapterListener: MyAdapterListener, val activity: SimpleActivity, val multiSelectorCallback: ModalMultiSelectorCallback,
|
class ViewHolder(val view: View, val adapterListener: MyAdapterListener, val activity: SimpleActivity, val multiSelectorCallback: ModalMultiSelectorCallback,
|
||||||
val multiSelector: MultiSelector, val listener: DirOperationsListener?, val isPickIntent: Boolean, val itemClick: (Directory) -> (Unit)) :
|
val multiSelector: MultiSelector, val listener: DirOperationsListener?, val isPickIntent: Boolean, val itemClick: (Directory) -> (Unit)) :
|
||||||
SwappingHolder(view, MultiSelector()) {
|
SwappingHolder(view, MultiSelector()) {
|
||||||
fun bindView(directory: Directory, isPinned: Boolean, scrollVertically: Boolean, isListView: Boolean, textColor: Int): View {
|
fun bindView(directory: Directory, isPinned: Boolean, scrollHorizontally: Boolean, isListView: Boolean, textColor: Int, showMediaCount: Boolean,
|
||||||
|
animateGifs: Boolean, cropThumbnails: Boolean): View {
|
||||||
itemView.apply {
|
itemView.apply {
|
||||||
dir_name.text = directory.name
|
dir_name.text = directory.name
|
||||||
dir_path?.text = "${directory.path.substringBeforeLast("/")}/"
|
dir_path?.text = "${directory.path.substringBeforeLast("/")}/"
|
||||||
photo_cnt.text = directory.mediaCnt.toString()
|
photo_cnt.text = directory.mediaCnt.toString()
|
||||||
activity.loadImage(directory.tmb, dir_thumbnail, scrollVertically)
|
activity.loadImage(directory.tmb, dir_thumbnail, scrollHorizontally, animateGifs, cropThumbnails)
|
||||||
dir_pin.beVisibleIf(isPinned)
|
dir_pin.beVisibleIf(isPinned)
|
||||||
dir_sd_card.beVisibleIf(activity.isPathOnSD(directory.path))
|
dir_sd_card.beVisibleIf(activity.isPathOnSD(directory.path))
|
||||||
|
photo_cnt.beVisibleIf(showMediaCount)
|
||||||
|
|
||||||
if (isListView) {
|
if (isListView) {
|
||||||
dir_name.setTextColor(textColor)
|
dir_name.setTextColor(textColor)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.simplemobiletools.gallery.adapters
|
package com.simplemobiletools.gallery.adapters
|
||||||
|
|
||||||
import android.graphics.PorterDuff
|
import android.graphics.PorterDuff
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.support.v7.view.ActionMode
|
import android.support.v7.view.ActionMode
|
||||||
import android.support.v7.widget.RecyclerView
|
import android.support.v7.widget.RecyclerView
|
||||||
|
@ -10,13 +11,13 @@ import com.bignerdranch.android.multiselector.ModalMultiSelectorCallback
|
||||||
import com.bignerdranch.android.multiselector.MultiSelector
|
import com.bignerdranch.android.multiselector.MultiSelector
|
||||||
import com.bignerdranch.android.multiselector.SwappingHolder
|
import com.bignerdranch.android.multiselector.SwappingHolder
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
|
||||||
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RenameItemDialog
|
import com.simplemobiletools.commons.dialogs.RenameItemDialog
|
||||||
import com.simplemobiletools.commons.extensions.beGone
|
import com.simplemobiletools.commons.extensions.beGone
|
||||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
|
import com.simplemobiletools.gallery.dialogs.DeleteWithRememberDialog
|
||||||
import com.simplemobiletools.gallery.extensions.*
|
import com.simplemobiletools.gallery.extensions.*
|
||||||
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_LIST
|
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_LIST
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
|
@ -24,27 +25,34 @@ import kotlinx.android.synthetic.main.photo_video_item_grid.view.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>, val listener: MediaOperationsListener?, val isPickIntent: Boolean,
|
class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>, val listener: MediaOperationsListener?, val isAGetIntent: Boolean,
|
||||||
val allowMultiplePicks: Boolean, val itemClick: (Medium) -> Unit) : RecyclerView.Adapter<MediaAdapter.ViewHolder>() {
|
val allowMultiplePicks: Boolean, val itemClick: (Medium) -> Unit) : RecyclerView.Adapter<MediaAdapter.ViewHolder>() {
|
||||||
|
|
||||||
val multiSelector = MultiSelector()
|
private val config = activity.config
|
||||||
val config = activity.config
|
|
||||||
val isListViewType = config.viewTypeFiles == VIEW_TYPE_LIST
|
|
||||||
|
|
||||||
var actMode: ActionMode? = null
|
var actMode: ActionMode? = null
|
||||||
var itemViews = SparseArray<View>()
|
|
||||||
val selectedPositions = HashSet<Int>()
|
|
||||||
var primaryColor = config.primaryColor
|
var primaryColor = config.primaryColor
|
||||||
var textColor = config.textColor
|
|
||||||
var displayFilenames = config.displayFileNames
|
private val multiSelector = MultiSelector()
|
||||||
var scrollVertically = !config.scrollHorizontally
|
private val isListViewType = config.viewTypeFiles == VIEW_TYPE_LIST
|
||||||
|
private var skipConfirmationDialog = false
|
||||||
|
|
||||||
|
private var itemViews = SparseArray<View>()
|
||||||
|
private val selectedPositions = HashSet<Int>()
|
||||||
|
private var scrollHorizontally = config.scrollHorizontally
|
||||||
|
private var animateGifs = config.animateGifs
|
||||||
|
private var cropThumbnails = config.cropThumbnails
|
||||||
|
private var textColor = config.textColor
|
||||||
|
private var displayFilenames = config.displayFileNames
|
||||||
|
|
||||||
fun toggleItemSelection(select: Boolean, pos: Int) {
|
fun toggleItemSelection(select: Boolean, pos: Int) {
|
||||||
if (select) {
|
if (select) {
|
||||||
itemViews[pos]?.medium_check?.background?.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN)
|
if (itemViews[pos] != null) {
|
||||||
|
itemViews[pos].medium_check?.background?.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN)
|
||||||
selectedPositions.add(pos)
|
selectedPositions.add(pos)
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
selectedPositions.remove(pos)
|
selectedPositions.remove(pos)
|
||||||
|
}
|
||||||
|
|
||||||
itemViews[pos]?.medium_check?.beVisibleIf(select)
|
itemViews[pos]?.medium_check?.beVisibleIf(select)
|
||||||
|
|
||||||
|
@ -82,7 +90,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
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 -> copyMoveTo(false)
|
||||||
R.id.cab_select_all -> selectAll()
|
R.id.cab_select_all -> selectAll()
|
||||||
R.id.cab_delete -> askConfirmDelete()
|
R.id.cab_open_with -> activity.openFile(Uri.fromFile(getCurrentFile()), true)
|
||||||
|
R.id.cab_set_as -> activity.setAs(Uri.fromFile(getCurrentFile()))
|
||||||
|
R.id.cab_delete -> checkDeleteConfirmation()
|
||||||
else -> return false
|
else -> return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@ -96,9 +106,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu): Boolean {
|
override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu): Boolean {
|
||||||
menu.findItem(R.id.cab_rename).isVisible = selectedPositions.size <= 1
|
menu.findItem(R.id.cab_rename).isVisible = selectedPositions.size == 1
|
||||||
menu.findItem(R.id.cab_edit).isVisible = selectedPositions.size == 1 && media.size > selectedPositions.first() && media[selectedPositions.first()].isImage()
|
menu.findItem(R.id.cab_open_with).isVisible = selectedPositions.size == 1
|
||||||
menu.findItem(R.id.cab_confirm_selection).isVisible = isPickIntent && allowMultiplePicks && selectedPositions.size > 0
|
menu.findItem(R.id.cab_confirm_selection).isVisible = isAGetIntent && allowMultiplePicks && selectedPositions.size > 0
|
||||||
|
|
||||||
checkHideBtnVisibility(menu)
|
checkHideBtnVisibility(menu)
|
||||||
|
|
||||||
|
@ -118,11 +128,12 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
var hiddenCnt = 0
|
var hiddenCnt = 0
|
||||||
var unhiddenCnt = 0
|
var unhiddenCnt = 0
|
||||||
selectedPositions.mapNotNull { media.getOrNull(it) }.forEach {
|
selectedPositions.mapNotNull { media.getOrNull(it) }.forEach {
|
||||||
if (it.name.startsWith('.'))
|
if (it.name.startsWith('.')) {
|
||||||
hiddenCnt++
|
hiddenCnt++
|
||||||
else
|
} else {
|
||||||
unhiddenCnt++
|
unhiddenCnt++
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
||||||
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
||||||
|
@ -154,7 +165,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun editFile() {
|
private fun editFile() {
|
||||||
activity.openFileEditor(getCurrentFile())
|
activity.openEditor(Uri.fromFile(getCurrentFile()))
|
||||||
actMode?.finish()
|
actMode?.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,18 +213,31 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
updateTitle(cnt)
|
updateTitle(cnt)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun askConfirmDelete() {
|
private fun checkDeleteConfirmation() {
|
||||||
ConfirmationDialog(activity) {
|
if (skipConfirmationDialog) {
|
||||||
deleteFiles()
|
deleteConfirmed()
|
||||||
actMode?.finish()
|
} else {
|
||||||
|
askConfirmDelete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun askConfirmDelete() {
|
||||||
|
DeleteWithRememberDialog(activity) {
|
||||||
|
skipConfirmationDialog = it
|
||||||
|
deleteConfirmed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun deleteConfirmed() {
|
||||||
|
deleteFiles()
|
||||||
|
}
|
||||||
|
|
||||||
private fun getCurrentFile() = File(media[selectedPositions.first()].path)
|
private fun getCurrentFile() = File(media[selectedPositions.first()].path)
|
||||||
|
|
||||||
private fun deleteFiles() {
|
private fun deleteFiles() {
|
||||||
if (selectedPositions.isEmpty())
|
if (selectedPositions.isEmpty()) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val files = ArrayList<File>(selectedPositions.size)
|
val files = ArrayList<File>(selectedPositions.size)
|
||||||
val removeMedia = ArrayList<Medium>(selectedPositions.size)
|
val removeMedia = ArrayList<Medium>(selectedPositions.size)
|
||||||
|
@ -242,6 +266,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
.forEachIndexed { curIndex, i -> newItems.put(curIndex, itemViews[i]) }
|
.forEachIndexed { curIndex, i -> newItems.put(curIndex, itemViews[i]) }
|
||||||
|
|
||||||
itemViews = newItems
|
itemViews = newItems
|
||||||
|
actMode?.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,11 +279,11 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
|
||||||
val layoutType = if (isListViewType) R.layout.photo_video_item_list else R.layout.photo_video_item_grid
|
val layoutType = if (isListViewType) R.layout.photo_video_item_list else R.layout.photo_video_item_grid
|
||||||
val view = LayoutInflater.from(parent?.context).inflate(layoutType, parent, false)
|
val view = LayoutInflater.from(parent?.context).inflate(layoutType, parent, false)
|
||||||
return ViewHolder(view, adapterListener, activity, multiSelectorMode, multiSelector, listener, allowMultiplePicks || !isPickIntent, itemClick)
|
return ViewHolder(view, adapterListener, activity, multiSelectorMode, multiSelector, listener, allowMultiplePicks || !isAGetIntent, itemClick)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
itemViews.put(position, holder.bindView(media[position], displayFilenames, scrollVertically, isListViewType, textColor))
|
itemViews.put(position, holder.bindView(media[position], displayFilenames, scrollHorizontally, isListViewType, textColor, animateGifs, cropThumbnails))
|
||||||
toggleItemSelection(selectedPositions.contains(position), position)
|
toggleItemSelection(selectedPositions.contains(position), position)
|
||||||
holder.itemView.tag = holder
|
holder.itemView.tag = holder
|
||||||
}
|
}
|
||||||
|
@ -276,8 +301,23 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
actMode?.finish()
|
actMode?.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateDisplayFilenames(display: Boolean) {
|
fun updateDisplayFilenames(displayFilenames: Boolean) {
|
||||||
displayFilenames = display
|
this.displayFilenames = displayFilenames
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateAnimateGifs(animateGifs: Boolean) {
|
||||||
|
this.animateGifs = animateGifs
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateCropThumbnails(cropThumbnails: Boolean) {
|
||||||
|
this.cropThumbnails = cropThumbnails
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateScrollHorizontally(scrollHorizontally: Boolean) {
|
||||||
|
this.scrollHorizontally = scrollHorizontally
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,12 +369,13 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
val multiSelector: MultiSelector, val listener: MediaOperationsListener?, val allowMultiplePicks: Boolean,
|
val multiSelector: MultiSelector, val listener: MediaOperationsListener?, val allowMultiplePicks: Boolean,
|
||||||
val itemClick: (Medium) -> (Unit)) :
|
val itemClick: (Medium) -> (Unit)) :
|
||||||
SwappingHolder(view, MultiSelector()) {
|
SwappingHolder(view, MultiSelector()) {
|
||||||
fun bindView(medium: Medium, displayFilenames: Boolean, scrollVertically: Boolean, isListViewType: Boolean, textColor: Int): View {
|
fun bindView(medium: Medium, displayFilenames: Boolean, scrollHorizontally: Boolean, isListViewType: Boolean, textColor: Int,
|
||||||
|
animateGifs: Boolean, cropThumbnails: Boolean): View {
|
||||||
itemView.apply {
|
itemView.apply {
|
||||||
play_outline.visibility = if (medium.video) View.VISIBLE else View.GONE
|
play_outline.visibility = if (medium.video) View.VISIBLE else View.GONE
|
||||||
photo_name.beVisibleIf(displayFilenames || isListViewType)
|
photo_name.beVisibleIf(displayFilenames || isListViewType)
|
||||||
photo_name.text = medium.name
|
photo_name.text = medium.name
|
||||||
activity.loadImage(medium.path, medium_thumbnail, scrollVertically)
|
activity.loadImage(medium.path, medium_thumbnail, scrollHorizontally, animateGifs, cropThumbnails)
|
||||||
|
|
||||||
if (isListViewType) {
|
if (isListViewType) {
|
||||||
photo_name.setTextColor(textColor)
|
photo_name.setTextColor(textColor)
|
||||||
|
|
|
@ -23,10 +23,10 @@ class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val m
|
||||||
bundle.putSerializable(MEDIUM, medium)
|
bundle.putSerializable(MEDIUM, medium)
|
||||||
val fragment: ViewPagerFragment
|
val fragment: ViewPagerFragment
|
||||||
|
|
||||||
if (medium.video) {
|
fragment = if (medium.video) {
|
||||||
fragment = VideoFragment()
|
VideoFragment()
|
||||||
} else {
|
} else {
|
||||||
fragment = PhotoFragment()
|
PhotoFragment()
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment.arguments = bundle
|
fragment.arguments = bundle
|
||||||
|
@ -34,15 +34,15 @@ class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val m
|
||||||
return fragment
|
return fragment
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemPosition(item: Any?) = PagerAdapter.POSITION_NONE
|
override fun getItemPosition(item: Any) = PagerAdapter.POSITION_NONE
|
||||||
|
|
||||||
override fun instantiateItem(container: ViewGroup?, position: Int): Any {
|
override fun instantiateItem(container: ViewGroup, position: Int): Any {
|
||||||
val fragment = super.instantiateItem(container, position) as ViewPagerFragment
|
val fragment = super.instantiateItem(container, position) as ViewPagerFragment
|
||||||
mFragments.put(position, fragment)
|
mFragments.put(position, fragment)
|
||||||
return fragment
|
return fragment
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun destroyItem(container: ViewGroup?, position: Int, any: Any?) {
|
override fun destroyItem(container: ViewGroup, position: Int, any: Any) {
|
||||||
mFragments.remove(position)
|
mFragments.remove(position)
|
||||||
super.destroyItem(container, position, any)
|
super.destroyItem(container, position, any)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,10 @@ package com.simplemobiletools.gallery.asynctasks
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.AsyncTask
|
import android.os.AsyncTask
|
||||||
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
||||||
import com.simplemobiletools.commons.extensions.hasWriteStoragePermission
|
import com.simplemobiletools.commons.extensions.hasPermission
|
||||||
import com.simplemobiletools.commons.extensions.internalStoragePath
|
import com.simplemobiletools.commons.extensions.internalStoragePath
|
||||||
import com.simplemobiletools.commons.extensions.sdCardPath
|
import com.simplemobiletools.commons.extensions.sdCardPath
|
||||||
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
import com.simplemobiletools.commons.helpers.SORT_DESCENDING
|
import com.simplemobiletools.commons.helpers.SORT_DESCENDING
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.extensions.config
|
import com.simplemobiletools.gallery.extensions.config
|
||||||
|
@ -21,7 +22,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||||
val mediaFetcher = MediaFetcher(context)
|
val mediaFetcher = MediaFetcher(context)
|
||||||
|
|
||||||
override fun doInBackground(vararg params: Void): ArrayList<Directory> {
|
override fun doInBackground(vararg params: Void): ArrayList<Directory> {
|
||||||
if (!context.hasWriteStoragePermission())
|
if (!context.hasPermission(PERMISSION_WRITE_STORAGE))
|
||||||
return ArrayList()
|
return ArrayList()
|
||||||
|
|
||||||
val config = context.config
|
val config = context.config
|
||||||
|
|
|
@ -10,14 +10,15 @@ import java.util.*
|
||||||
class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo: Boolean = false, val isPickImage: Boolean = false,
|
class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo: Boolean = false, val isPickImage: Boolean = false,
|
||||||
val showAll: Boolean, val callback: (media: ArrayList<Medium>) -> Unit) :
|
val showAll: Boolean, val callback: (media: ArrayList<Medium>) -> Unit) :
|
||||||
AsyncTask<Void, Void, ArrayList<Medium>>() {
|
AsyncTask<Void, Void, ArrayList<Medium>>() {
|
||||||
val mediaFetcher = MediaFetcher(context)
|
private val mediaFetcher = MediaFetcher(context)
|
||||||
|
|
||||||
override fun doInBackground(vararg params: Void): ArrayList<Medium> {
|
override fun doInBackground(vararg params: Void): ArrayList<Medium> {
|
||||||
return if (showAll) {
|
return if (showAll) {
|
||||||
val mediaMap = mediaFetcher.getMediaByDirectories(isPickVideo, isPickImage)
|
val mediaMap = mediaFetcher.getMediaByDirectories(isPickVideo, isPickImage)
|
||||||
val media = ArrayList<Medium>()
|
val media = ArrayList<Medium>()
|
||||||
for ((path, curMedia) in mediaMap) {
|
|
||||||
media.addAll(curMedia)
|
mediaMap.values.forEach {
|
||||||
|
media.addAll(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
Medium.sorting = context.config.getFileSorting("")
|
Medium.sorting = context.config.getFileSorting("")
|
||||||
|
|
|
@ -42,12 +42,12 @@ class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting:
|
||||||
val sortingRadio = view.sorting_dialog_radio_sorting
|
val sortingRadio = view.sorting_dialog_radio_sorting
|
||||||
var sortBtn = sortingRadio.sorting_dialog_radio_name
|
var sortBtn = sortingRadio.sorting_dialog_radio_name
|
||||||
|
|
||||||
if (currSorting and SORT_BY_SIZE != 0) {
|
when {
|
||||||
sortBtn = sortingRadio.sorting_dialog_radio_size
|
currSorting and SORT_BY_PATH != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_path
|
||||||
} else if (currSorting and SORT_BY_DATE_MODIFIED != 0) {
|
currSorting and SORT_BY_SIZE != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_size
|
||||||
sortBtn = sortingRadio.sorting_dialog_radio_last_modified
|
currSorting and SORT_BY_DATE_MODIFIED != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_last_modified
|
||||||
} else if (currSorting and SORT_BY_DATE_TAKEN != 0)
|
currSorting and SORT_BY_DATE_TAKEN != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_date_taken
|
||||||
sortBtn = sortingRadio.sorting_dialog_radio_date_taken
|
}
|
||||||
sortBtn.isChecked = true
|
sortBtn.isChecked = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting:
|
||||||
val sortingRadio = view.sorting_dialog_radio_sorting
|
val sortingRadio = view.sorting_dialog_radio_sorting
|
||||||
var sorting = when (sortingRadio.checkedRadioButtonId) {
|
var sorting = when (sortingRadio.checkedRadioButtonId) {
|
||||||
R.id.sorting_dialog_radio_name -> SORT_BY_NAME
|
R.id.sorting_dialog_radio_name -> SORT_BY_NAME
|
||||||
|
R.id.sorting_dialog_radio_path -> SORT_BY_PATH
|
||||||
R.id.sorting_dialog_radio_size -> SORT_BY_SIZE
|
R.id.sorting_dialog_radio_size -> SORT_BY_SIZE
|
||||||
R.id.sorting_dialog_radio_last_modified -> SORT_BY_DATE_MODIFIED
|
R.id.sorting_dialog_radio_last_modified -> SORT_BY_DATE_MODIFIED
|
||||||
else -> SORT_BY_DATE_TAKEN
|
else -> SORT_BY_DATE_TAKEN
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.simplemobiletools.gallery.dialogs
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.support.v7.app.AlertDialog
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
|
import com.simplemobiletools.gallery.R
|
||||||
|
import kotlinx.android.synthetic.main.dialog_delete_with_remember.view.*
|
||||||
|
|
||||||
|
class DeleteWithRememberDialog(val context: Context, val callback: (remember: Boolean) -> Unit) {
|
||||||
|
var dialog: AlertDialog
|
||||||
|
val view = LayoutInflater.from(context).inflate(R.layout.dialog_delete_with_remember, null)
|
||||||
|
|
||||||
|
init {
|
||||||
|
val builder = AlertDialog.Builder(context)
|
||||||
|
.setPositiveButton(R.string.yes, { dialog, which -> dialogConfirmed() })
|
||||||
|
.setNegativeButton(R.string.no, null)
|
||||||
|
|
||||||
|
dialog = builder.create().apply {
|
||||||
|
context.setupDialogStuff(view, this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun dialogConfirmed() {
|
||||||
|
dialog.dismiss()
|
||||||
|
callback(view.delete_remember_checkbox.isChecked)
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.simplemobiletools.gallery.dialogs
|
||||||
|
|
||||||
|
import android.support.v7.app.AlertDialog
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
|
import com.simplemobiletools.gallery.R
|
||||||
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
|
import com.simplemobiletools.gallery.extensions.config
|
||||||
|
import com.simplemobiletools.gallery.helpers.*
|
||||||
|
import kotlinx.android.synthetic.main.dialog_manage_extended_details.view.*
|
||||||
|
|
||||||
|
class ManageExtendedDetailsDialog(val activity: SimpleActivity, val callback: (result: Int) -> Unit) {
|
||||||
|
private var view: View = LayoutInflater.from(activity).inflate(R.layout.dialog_manage_extended_details, null)
|
||||||
|
|
||||||
|
init {
|
||||||
|
val details = activity.config.extendedDetails
|
||||||
|
view.apply {
|
||||||
|
manage_extended_details_name.isChecked = details and EXT_NAME != 0
|
||||||
|
manage_extended_details_path.isChecked = details and EXT_PATH != 0
|
||||||
|
manage_extended_details_size.isChecked = details and EXT_SIZE != 0
|
||||||
|
manage_extended_details_resolution.isChecked = details and EXT_RESOLUTION != 0
|
||||||
|
manage_extended_details_last_modified.isChecked = details and EXT_LAST_MODIFIED != 0
|
||||||
|
manage_extended_details_date_taken.isChecked = details and EXT_DATE_TAKEN != 0
|
||||||
|
manage_extended_details_camera.isChecked = details and EXT_CAMERA_MODEL != 0
|
||||||
|
manage_extended_details_exif.isChecked = details and EXT_EXIF_PROPERTIES != 0
|
||||||
|
manage_extended_details_duration.isChecked = details and EXT_DURATION != 0
|
||||||
|
manage_extended_details_artist.isChecked = details and EXT_ARTIST != 0
|
||||||
|
manage_extended_details_album.isChecked = details and EXT_ALBUM != 0
|
||||||
|
}
|
||||||
|
|
||||||
|
AlertDialog.Builder(activity)
|
||||||
|
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.create().apply {
|
||||||
|
activity.setupDialogStuff(view, this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun dialogConfirmed() {
|
||||||
|
var result = 0
|
||||||
|
view.apply {
|
||||||
|
if (manage_extended_details_name.isChecked)
|
||||||
|
result += EXT_NAME
|
||||||
|
if (manage_extended_details_path.isChecked)
|
||||||
|
result += EXT_PATH
|
||||||
|
if (manage_extended_details_size.isChecked)
|
||||||
|
result += EXT_SIZE
|
||||||
|
if (manage_extended_details_resolution.isChecked)
|
||||||
|
result += EXT_RESOLUTION
|
||||||
|
if (manage_extended_details_last_modified.isChecked)
|
||||||
|
result += EXT_LAST_MODIFIED
|
||||||
|
if (manage_extended_details_date_taken.isChecked)
|
||||||
|
result += EXT_DATE_TAKEN
|
||||||
|
if (manage_extended_details_camera.isChecked)
|
||||||
|
result += EXT_CAMERA_MODEL
|
||||||
|
if (manage_extended_details_exif.isChecked)
|
||||||
|
result += EXT_EXIF_PROPERTIES
|
||||||
|
if (manage_extended_details_duration.isChecked)
|
||||||
|
result += EXT_DURATION
|
||||||
|
if (manage_extended_details_artist.isChecked)
|
||||||
|
result += EXT_ARTIST
|
||||||
|
if (manage_extended_details_album.isChecked)
|
||||||
|
result += EXT_ALBUM
|
||||||
|
}
|
||||||
|
|
||||||
|
activity.config.extendedDetails = result
|
||||||
|
callback(result)
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,6 @@ package com.simplemobiletools.gallery.dialogs
|
||||||
import android.support.v7.app.AlertDialog
|
import android.support.v7.app.AlertDialog
|
||||||
import android.support.v7.widget.GridLayoutManager
|
import android.support.v7.widget.GridLayoutManager
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
|
||||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
import com.simplemobiletools.commons.extensions.beGoneIf
|
import com.simplemobiletools.commons.extensions.beGoneIf
|
||||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||||
|
@ -22,8 +21,8 @@ import kotlinx.android.synthetic.main.dialog_directory_picker.view.*
|
||||||
|
|
||||||
class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String, val callback: (path: String) -> Unit) {
|
class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String, val callback: (path: String) -> Unit) {
|
||||||
var dialog: AlertDialog
|
var dialog: AlertDialog
|
||||||
var shownDirectories: ArrayList<Directory> = ArrayList()
|
var shownDirectories = ArrayList<Directory>()
|
||||||
var view: View = LayoutInflater.from(activity).inflate(R.layout.dialog_directory_picker, null)
|
var view = LayoutInflater.from(activity).inflate(R.layout.dialog_directory_picker, null)
|
||||||
var isGridViewType = activity.config.viewTypeFolders == VIEW_TYPE_GRID
|
var isGridViewType = activity.config.viewTypeFolders == VIEW_TYPE_GRID
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -38,6 +37,7 @@ class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String,
|
||||||
.setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() })
|
.setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() })
|
||||||
.create().apply {
|
.create().apply {
|
||||||
activity.setupDialogStuff(view, this, R.string.select_destination)
|
activity.setupDialogStuff(view, this, R.string.select_destination)
|
||||||
|
}
|
||||||
|
|
||||||
val dirs = activity.getCachedDirectories()
|
val dirs = activity.getCachedDirectories()
|
||||||
if (dirs.isNotEmpty()) {
|
if (dirs.isNotEmpty()) {
|
||||||
|
@ -48,7 +48,6 @@ class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String,
|
||||||
gotDirectories(activity.addTempFolderIfNeeded(it))
|
gotDirectories(activity.addTempFolderIfNeeded(it))
|
||||||
}.execute()
|
}.execute()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun showOtherFolder() {
|
private fun showOtherFolder() {
|
||||||
val showHidden = activity.config.shouldShowHidden
|
val showHidden = activity.config.shouldShowHidden
|
||||||
|
|
|
@ -1,37 +1,42 @@
|
||||||
package com.simplemobiletools.gallery.dialogs
|
package com.simplemobiletools.gallery.dialogs
|
||||||
|
|
||||||
import android.support.v7.app.AlertDialog
|
import android.support.v7.app.AlertDialog
|
||||||
import android.support.v7.widget.RecyclerView
|
import android.support.v7.widget.GridLayoutManager
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import com.google.gson.Gson
|
import com.simplemobiletools.commons.extensions.beGoneIf
|
||||||
import com.google.gson.reflect.TypeToken
|
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.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import com.simplemobiletools.gallery.adapters.MediaAdapter
|
import com.simplemobiletools.gallery.adapters.MediaAdapter
|
||||||
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
||||||
import com.simplemobiletools.gallery.extensions.config
|
import com.simplemobiletools.gallery.extensions.config
|
||||||
|
import com.simplemobiletools.gallery.extensions.getCachedMedia
|
||||||
|
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_GRID
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import kotlinx.android.synthetic.main.dialog_medium_picker.view.*
|
import kotlinx.android.synthetic.main.dialog_medium_picker.view.*
|
||||||
|
|
||||||
class PickMediumDialog(val activity: SimpleActivity, val path: String, val callback: (path: String) -> Unit) {
|
class PickMediumDialog(val activity: SimpleActivity, val path: String, val callback: (path: String) -> Unit) {
|
||||||
var dialog: AlertDialog
|
var dialog: AlertDialog
|
||||||
var mediaGrid: RecyclerView
|
var shownMedia = ArrayList<Medium>()
|
||||||
var shownMedia: ArrayList<Medium> = ArrayList()
|
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_medium_picker, null)
|
||||||
|
var isGridViewType = activity.config.viewTypeFiles == VIEW_TYPE_GRID
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_medium_picker, null)
|
(view.media_grid.layoutManager as GridLayoutManager).apply {
|
||||||
mediaGrid = view.media_grid
|
orientation = if (activity.config.scrollHorizontally && isGridViewType) GridLayoutManager.HORIZONTAL else GridLayoutManager.VERTICAL
|
||||||
|
spanCount = if (isGridViewType) activity.config.mediaColumnCnt else 1
|
||||||
|
}
|
||||||
|
|
||||||
dialog = AlertDialog.Builder(activity)
|
dialog = AlertDialog.Builder(activity)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() })
|
||||||
.create().apply {
|
.create().apply {
|
||||||
activity.setupDialogStuff(view, this, R.string.select_photo)
|
activity.setupDialogStuff(view, this, R.string.select_photo)
|
||||||
|
}
|
||||||
|
|
||||||
val token = object : TypeToken<List<Medium>>() {}.type
|
val media = activity.getCachedMedia(path).filter { !it.video } as ArrayList
|
||||||
val media = Gson().fromJson<ArrayList<Medium>>(activity.config.loadFolderMedia(path), token) ?: ArrayList<Medium>(1)
|
|
||||||
|
|
||||||
if (media.isNotEmpty()) {
|
if (media.isNotEmpty()) {
|
||||||
gotMedia(media)
|
gotMedia(media)
|
||||||
}
|
}
|
||||||
|
@ -40,6 +45,12 @@ class PickMediumDialog(val activity: SimpleActivity, val path: String, val callb
|
||||||
gotMedia(it)
|
gotMedia(it)
|
||||||
}.execute()
|
}.execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showOtherFolder() {
|
||||||
|
PickDirectoryDialog(activity, path) {
|
||||||
|
callback(it)
|
||||||
|
dialog.dismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun gotMedia(media: ArrayList<Medium>) {
|
private fun gotMedia(media: ArrayList<Medium>) {
|
||||||
|
@ -51,6 +62,22 @@ class PickMediumDialog(val activity: SimpleActivity, val path: String, val callb
|
||||||
callback(it.path)
|
callback(it.path)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
mediaGrid.adapter = adapter
|
|
||||||
|
val scrollHorizontally = activity.config.scrollHorizontally && isGridViewType
|
||||||
|
view.apply {
|
||||||
|
media_grid.adapter = adapter
|
||||||
|
|
||||||
|
media_vertical_fastscroller.isHorizontal = false
|
||||||
|
media_vertical_fastscroller.beGoneIf(scrollHorizontally)
|
||||||
|
|
||||||
|
media_horizontal_fastscroller.isHorizontal = true
|
||||||
|
media_horizontal_fastscroller.beVisibleIf(scrollHorizontally)
|
||||||
|
|
||||||
|
if (scrollHorizontally) {
|
||||||
|
media_horizontal_fastscroller.setViews(media_grid)
|
||||||
|
} else {
|
||||||
|
media_vertical_fastscroller.setViews(media_grid)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import kotlinx.android.synthetic.main.dialog_save_as.view.*
|
import kotlinx.android.synthetic.main.dialog_save_as.view.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class SaveAsDialog(val activity: SimpleActivity, val path: String, val callback: (savePath: String) -> Unit) {
|
class SaveAsDialog(val activity: SimpleActivity, val path: String, val appendFilename: Boolean, val callback: (savePath: String) -> Unit) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
var realPath = File(path).parent.trimEnd('/')
|
var realPath = File(path).parent.trimEnd('/')
|
||||||
|
@ -28,6 +28,10 @@ class SaveAsDialog(val activity: SimpleActivity, val path: String, val callback:
|
||||||
save_as_extension.setText(extension)
|
save_as_extension.setText(extension)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (appendFilename) {
|
||||||
|
name += "_1"
|
||||||
|
}
|
||||||
|
|
||||||
save_as_name.setText(name)
|
save_as_name.setText(name)
|
||||||
save_as_path.setOnClickListener {
|
save_as_path.setOnClickListener {
|
||||||
FilePickerDialog(activity, realPath, false, false, true) {
|
FilePickerDialog(activity, realPath, false, false, true) {
|
||||||
|
|
|
@ -2,16 +2,11 @@ package com.simplemobiletools.gallery.extensions
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.database.Cursor
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.support.v7.app.AppCompatActivity
|
import android.support.v7.app.AppCompatActivity
|
||||||
import android.util.DisplayMetrics
|
|
||||||
import android.view.KeyCharacterMap
|
|
||||||
import android.view.KeyEvent
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewConfiguration
|
import android.widget.ImageView
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.load.DecodeFormat
|
import com.bumptech.glide.load.DecodeFormat
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
|
@ -24,165 +19,42 @@ import com.simplemobiletools.commons.helpers.*
|
||||||
import com.simplemobiletools.gallery.BuildConfig
|
import com.simplemobiletools.gallery.BuildConfig
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import com.simplemobiletools.gallery.helpers.IS_FROM_GALLERY
|
|
||||||
import com.simplemobiletools.gallery.helpers.NOMEDIA
|
import com.simplemobiletools.gallery.helpers.NOMEDIA
|
||||||
import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE
|
|
||||||
import com.simplemobiletools.gallery.helpers.REQUEST_SET_AS
|
|
||||||
import com.simplemobiletools.gallery.models.Directory
|
import com.simplemobiletools.gallery.models.Directory
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import com.simplemobiletools.gallery.views.MySquareImageView
|
import com.simplemobiletools.gallery.views.MySquareImageView
|
||||||
|
import pl.droidsonroids.gif.GifDrawable
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
fun Activity.shareUri(medium: Medium, uri: Uri) {
|
fun Activity.shareUri(uri: Uri) {
|
||||||
val shareTitle = resources.getString(R.string.share_via)
|
shareUri(uri, BuildConfig.APPLICATION_ID)
|
||||||
Intent().apply {
|
}
|
||||||
action = Intent.ACTION_SEND
|
|
||||||
putExtra(Intent.EXTRA_STREAM, uri)
|
fun Activity.shareUris(uris: ArrayList<Uri>) {
|
||||||
type = medium.getMimeType()
|
shareUris(uris, BuildConfig.APPLICATION_ID)
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
startActivity(Intent.createChooser(this, shareTitle))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.shareMedium(medium: Medium) {
|
fun Activity.shareMedium(medium: Medium) {
|
||||||
val shareTitle = resources.getString(R.string.share_via)
|
|
||||||
val file = File(medium.path)
|
val file = File(medium.path)
|
||||||
val uri = Uri.fromFile(file)
|
shareUri(Uri.fromFile(file))
|
||||||
|
|
||||||
Intent().apply {
|
|
||||||
action = Intent.ACTION_SEND
|
|
||||||
putExtra(Intent.EXTRA_STREAM, uri)
|
|
||||||
type = medium.getMimeType()
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
startActivity(Intent.createChooser(this, shareTitle))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.shareMedia(media: List<Medium>) {
|
fun Activity.shareMedia(media: List<Medium>) {
|
||||||
val shareTitle = resources.getString(R.string.share_via)
|
val uris = media.map { getFilePublicUri(File(it.path), BuildConfig.APPLICATION_ID) } as ArrayList
|
||||||
val uris = media.map { Uri.fromFile(File(it.path)) } as ArrayList
|
shareUris(uris)
|
||||||
|
|
||||||
Intent().apply {
|
|
||||||
action = Intent.ACTION_SEND_MULTIPLE
|
|
||||||
type = "image/* video/*"
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris)
|
|
||||||
startActivity(Intent.createChooser(this, shareTitle))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.trySetAs(file: File) {
|
fun Activity.setAs(uri: Uri) {
|
||||||
try {
|
setAs(uri, BuildConfig.APPLICATION_ID)
|
||||||
var uri = Uri.fromFile(file)
|
|
||||||
if (!setAs(uri, file)) {
|
|
||||||
uri = getFileContentUri(file)
|
|
||||||
setAs(uri, file, false)
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
toast(R.string.unknown_error_occurred)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.setAs(uri: Uri, file: File, showToast: Boolean = true): Boolean {
|
fun Activity.openFile(uri: Uri, forceChooser: Boolean) {
|
||||||
var success = false
|
openFile(uri, forceChooser, BuildConfig.APPLICATION_ID)
|
||||||
Intent().apply {
|
|
||||||
action = Intent.ACTION_ATTACH_DATA
|
|
||||||
setDataAndType(uri, file.getMimeType("image/*"))
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
val chooser = Intent.createChooser(this, getString(R.string.set_as))
|
|
||||||
|
|
||||||
success = if (resolveActivity(packageManager) != null) {
|
|
||||||
startActivityForResult(chooser, REQUEST_SET_AS)
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
if (showToast) {
|
|
||||||
toast(R.string.no_capable_app_found)
|
|
||||||
}
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return success
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.getFileContentUri(file: File): Uri? {
|
fun Activity.openEditor(uri: Uri) {
|
||||||
val uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI
|
openEditor(uri, BuildConfig.APPLICATION_ID)
|
||||||
val projection = arrayOf(MediaStore.Images.Media._ID)
|
|
||||||
val selection = "${MediaStore.Images.Media.DATA} = ?"
|
|
||||||
val selectionArgs = arrayOf(file.absolutePath)
|
|
||||||
|
|
||||||
var cursor: Cursor? = null
|
|
||||||
try {
|
|
||||||
cursor = contentResolver.query(uri, projection, selection, selectionArgs, null)
|
|
||||||
if (cursor?.moveToFirst() == true) {
|
|
||||||
val id = cursor.getIntValue(MediaStore.Images.Media._ID)
|
|
||||||
return Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "$id")
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
cursor?.close()
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Activity.openWith(file: File, forceChooser: Boolean = true) {
|
|
||||||
val uri = Uri.fromFile(file)
|
|
||||||
Intent().apply {
|
|
||||||
action = Intent.ACTION_VIEW
|
|
||||||
setDataAndType(uri, file.getMimeType())
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
putExtra(IS_FROM_GALLERY, true)
|
|
||||||
|
|
||||||
if (resolveActivity(packageManager) != null) {
|
|
||||||
val chooser = Intent.createChooser(this, getString(R.string.open_with))
|
|
||||||
startActivity(if (forceChooser) chooser else this)
|
|
||||||
} else {
|
|
||||||
toast(R.string.no_app_found)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Activity.openFileEditor(file: File) {
|
|
||||||
openEditor(Uri.fromFile(file))
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Activity.openEditor(uri: Uri, forceChooser: Boolean = false) {
|
|
||||||
Intent().apply {
|
|
||||||
action = Intent.ACTION_EDIT
|
|
||||||
setDataAndType(uri, "image/*")
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
|
|
||||||
if (resolveActivity(packageManager) != null) {
|
|
||||||
val chooser = Intent.createChooser(this, getString(R.string.edit_image_with))
|
|
||||||
startActivityForResult(if (forceChooser) chooser else this, REQUEST_EDIT_IMAGE)
|
|
||||||
} else {
|
|
||||||
toast(R.string.no_editor_found)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Activity.hasNavBar(): Boolean {
|
|
||||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
|
||||||
val display = windowManager.defaultDisplay
|
|
||||||
|
|
||||||
val realDisplayMetrics = DisplayMetrics()
|
|
||||||
display.getRealMetrics(realDisplayMetrics)
|
|
||||||
|
|
||||||
val realHeight = realDisplayMetrics.heightPixels
|
|
||||||
val realWidth = realDisplayMetrics.widthPixels
|
|
||||||
|
|
||||||
val displayMetrics = DisplayMetrics()
|
|
||||||
display.getMetrics(displayMetrics)
|
|
||||||
|
|
||||||
val displayHeight = displayMetrics.heightPixels
|
|
||||||
val displayWidth = displayMetrics.widthPixels
|
|
||||||
|
|
||||||
realWidth - displayWidth > 0 || realHeight - displayHeight > 0
|
|
||||||
} else {
|
|
||||||
val hasMenuKey = ViewConfiguration.get(applicationContext).hasPermanentMenuKey()
|
|
||||||
val hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK)
|
|
||||||
!hasMenuKey && !hasBackKey
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.launchCamera() {
|
fun Activity.launchCamera() {
|
||||||
|
@ -196,7 +68,7 @@ fun Activity.launchCamera() {
|
||||||
|
|
||||||
fun SimpleActivity.launchAbout() {
|
fun SimpleActivity.launchAbout() {
|
||||||
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_MULTISELECT or LICENSE_RTL
|
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_MULTISELECT or LICENSE_RTL
|
||||||
or LICENSE_PHOTOVIEW or LICENSE_SUBSAMPLING or LICENSE_PATTERN, BuildConfig.VERSION_NAME)
|
or LICENSE_SUBSAMPLING or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GIF_DRAWABLE, BuildConfig.VERSION_NAME)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun AppCompatActivity.showSystemUI() {
|
fun AppCompatActivity.showSystemUI() {
|
||||||
|
@ -224,9 +96,10 @@ fun SimpleActivity.addNoMedia(path: String, callback: () -> Unit) {
|
||||||
|
|
||||||
if (needsStupidWritePermissions(path)) {
|
if (needsStupidWritePermissions(path)) {
|
||||||
handleSAFDialog(file) {
|
handleSAFDialog(file) {
|
||||||
try {
|
val fileDocument = getFileDocument(path)
|
||||||
getFileDocument(path)?.createFile("", NOMEDIA)
|
if (fileDocument?.exists() == true && fileDocument.isDirectory) {
|
||||||
} catch (e: Exception) {
|
fileDocument.createFile("", NOMEDIA)
|
||||||
|
} else {
|
||||||
toast(R.string.unknown_error_occurred)
|
toast(R.string.unknown_error_occurred)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,9 +107,10 @@ fun SimpleActivity.addNoMedia(path: String, callback: () -> Unit) {
|
||||||
try {
|
try {
|
||||||
file.createNewFile()
|
file.createNewFile()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
toast(R.string.unknown_error_occurred)
|
showErrorToast(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scanFile(file) {
|
scanFile(file) {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
@ -259,29 +133,36 @@ fun SimpleActivity.toggleFileVisibility(oldFile: File, hide: Boolean, callback:
|
||||||
}
|
}
|
||||||
val newFile = File(path, filename)
|
val newFile = File(path, filename)
|
||||||
renameFile(oldFile, newFile) {
|
renameFile(oldFile, newFile) {
|
||||||
newFile.setLastModified(System.currentTimeMillis())
|
|
||||||
callback(newFile)
|
callback(newFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.loadImage(path: String, target: MySquareImageView, verticalScroll: Boolean) {
|
fun Activity.loadImage(path: String, target: MySquareImageView, horizontalScroll: Boolean, animateGifs: Boolean, cropThumbnails: Boolean) {
|
||||||
target.isVerticalScrolling = verticalScroll
|
target.isHorizontalScrolling = horizontalScroll
|
||||||
if (path.isImageFast() || path.isVideoFast()) {
|
if (path.isImageFast() || path.isVideoFast()) {
|
||||||
if (path.isPng()) {
|
if (path.isPng()) {
|
||||||
loadPng(path, target)
|
loadPng(path, target, cropThumbnails)
|
||||||
} else {
|
} else {
|
||||||
loadJpg(path, target)
|
loadJpg(path, target, cropThumbnails)
|
||||||
}
|
}
|
||||||
} else if (path.isGif()) {
|
} else if (path.isGif()) {
|
||||||
if (config.animateGifs) {
|
try {
|
||||||
loadAnimatedGif(path, target)
|
val gifDrawable = GifDrawable(path)
|
||||||
|
target.setImageDrawable(gifDrawable)
|
||||||
|
if (animateGifs) {
|
||||||
|
gifDrawable.start()
|
||||||
} else {
|
} else {
|
||||||
loadStaticGif(path, target)
|
gifDrawable.stop()
|
||||||
|
}
|
||||||
|
|
||||||
|
target.scaleType = if (cropThumbnails) ImageView.ScaleType.CENTER_CROP else ImageView.ScaleType.FIT_CENTER
|
||||||
|
} catch (e: Exception) {
|
||||||
|
loadJpg(path, target, cropThumbnails)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.loadPng(path: String, target: MySquareImageView) {
|
fun Activity.loadPng(path: String, target: MySquareImageView, cropThumbnails: Boolean) {
|
||||||
val options = RequestOptions()
|
val options = RequestOptions()
|
||||||
.signature(path.getFileSignature())
|
.signature(path.getFileSignature())
|
||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
|
@ -291,11 +172,11 @@ fun Activity.loadPng(path: String, target: MySquareImageView) {
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.load(path)
|
.load(path)
|
||||||
|
|
||||||
if (config.cropThumbnails) options.centerCrop() else options.fitCenter()
|
if (cropThumbnails) options.centerCrop() else options.fitCenter()
|
||||||
builder.apply(options).into(target)
|
builder.apply(options).into(target)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.loadJpg(path: String, target: MySquareImageView) {
|
fun Activity.loadJpg(path: String, target: MySquareImageView, cropThumbnails: Boolean) {
|
||||||
val options = RequestOptions()
|
val options = RequestOptions()
|
||||||
.signature(path.getFileSignature())
|
.signature(path.getFileSignature())
|
||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
|
@ -303,37 +184,16 @@ fun Activity.loadJpg(path: String, target: MySquareImageView) {
|
||||||
val builder = Glide.with(applicationContext)
|
val builder = Glide.with(applicationContext)
|
||||||
.load(path)
|
.load(path)
|
||||||
|
|
||||||
if (config.cropThumbnails) options.centerCrop() else options.fitCenter()
|
if (cropThumbnails) options.centerCrop() else options.fitCenter()
|
||||||
builder.apply(options).transition(DrawableTransitionOptions.withCrossFade()).into(target)
|
builder.apply(options).transition(DrawableTransitionOptions.withCrossFade()).into(target)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.loadAnimatedGif(path: String, target: MySquareImageView) {
|
|
||||||
val options = RequestOptions()
|
|
||||||
.signature(path.getFileSignature())
|
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
|
||||||
|
|
||||||
val builder = Glide.with(applicationContext)
|
|
||||||
.asGif()
|
|
||||||
.load(path)
|
|
||||||
|
|
||||||
if (config.cropThumbnails) options.centerCrop() else options.fitCenter()
|
|
||||||
builder.apply(options).transition(DrawableTransitionOptions.withCrossFade()).into(target)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Activity.loadStaticGif(path: String, target: MySquareImageView) {
|
|
||||||
val options = RequestOptions()
|
|
||||||
.signature(path.getFileSignature())
|
|
||||||
.diskCacheStrategy(DiskCacheStrategy.DATA)
|
|
||||||
|
|
||||||
val builder = Glide.with(applicationContext)
|
|
||||||
.asBitmap()
|
|
||||||
.load(path)
|
|
||||||
|
|
||||||
if (config.cropThumbnails) options.centerCrop() else options.fitCenter()
|
|
||||||
builder.apply(options).into(target)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Activity.getCachedDirectories(): ArrayList<Directory> {
|
fun Activity.getCachedDirectories(): ArrayList<Directory> {
|
||||||
val token = object : TypeToken<List<Directory>>() {}.type
|
val token = object : TypeToken<List<Directory>>() {}.type
|
||||||
return Gson().fromJson<ArrayList<Directory>>(config.directories, token) ?: ArrayList<Directory>(1)
|
return Gson().fromJson<ArrayList<Directory>>(config.directories, token) ?: ArrayList<Directory>(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Activity.getCachedMedia(path: String): ArrayList<Medium> {
|
||||||
|
val token = object : TypeToken<List<Medium>>() {}.type
|
||||||
|
return Gson().fromJson<ArrayList<Medium>>(config.loadFolderMedia(path), token) ?: ArrayList(1)
|
||||||
|
}
|
||||||
|
|
|
@ -3,12 +3,9 @@ package com.simplemobiletools.gallery.extensions
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.database.Cursor
|
|
||||||
import android.graphics.Point
|
import android.graphics.Point
|
||||||
import android.media.AudioManager
|
import android.media.AudioManager
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.provider.MediaStore
|
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import com.simplemobiletools.commons.extensions.humanizePath
|
import com.simplemobiletools.commons.extensions.humanizePath
|
||||||
import com.simplemobiletools.gallery.activities.SettingsActivity
|
import com.simplemobiletools.gallery.activities.SettingsActivity
|
||||||
|
@ -44,32 +41,16 @@ val Context.realScreenSize: Point
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.getRealPathFromURI(uri: Uri): String? {
|
|
||||||
var cursor: Cursor? = null
|
|
||||||
try {
|
|
||||||
val projection = arrayOf(MediaStore.Images.Media.DATA)
|
|
||||||
cursor = contentResolver.query(uri, projection, null, null, null)
|
|
||||||
if (cursor?.moveToFirst() == true) {
|
|
||||||
val index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA)
|
|
||||||
return cursor.getString(index)
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
} finally {
|
|
||||||
cursor?.close()
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Context.getHumanizedFilename(path: String): String {
|
fun Context.getHumanizedFilename(path: String): String {
|
||||||
val humanized = humanizePath(path)
|
val humanized = humanizePath(path)
|
||||||
return humanized.substring(humanized.lastIndexOf("/") + 1)
|
return humanized.substring(humanized.lastIndexOf("/") + 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.launchSettings() {
|
fun Context.launchSettings() {
|
||||||
startActivity(Intent(this, SettingsActivity::class.java))
|
startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
val Context.config: Config get() = Config.newInstance(this)
|
val Context.config: Config get() = Config.newInstance(applicationContext)
|
||||||
|
|
||||||
fun Context.movePinnedDirectoriesToFront(dirs: ArrayList<Directory>): ArrayList<Directory> {
|
fun Context.movePinnedDirectoriesToFront(dirs: ArrayList<Directory>): ArrayList<Directory> {
|
||||||
val foundFolders = ArrayList<Directory>()
|
val foundFolders = ArrayList<Directory>()
|
||||||
|
|
|
@ -13,105 +13,123 @@ import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.Priority
|
|
||||||
import com.bumptech.glide.load.DataSource
|
import com.bumptech.glide.load.DataSource
|
||||||
import com.bumptech.glide.load.DecodeFormat
|
import com.bumptech.glide.load.DecodeFormat
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.bumptech.glide.load.engine.GlideException
|
import com.bumptech.glide.load.engine.GlideException
|
||||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
|
||||||
import com.bumptech.glide.request.RequestListener
|
import com.bumptech.glide.request.RequestListener
|
||||||
import com.bumptech.glide.request.RequestOptions
|
import com.bumptech.glide.request.RequestOptions
|
||||||
import com.bumptech.glide.request.target.Target
|
import com.bumptech.glide.request.target.Target
|
||||||
import com.davemorrissey.labs.subscaleview.ImageSource
|
import com.davemorrissey.labs.subscaleview.ImageSource
|
||||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||||
import com.simplemobiletools.commons.extensions.beGone
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.extensions.beVisible
|
|
||||||
import com.simplemobiletools.commons.extensions.toast
|
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
|
import com.simplemobiletools.gallery.activities.PhotoActivity
|
||||||
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
||||||
import com.simplemobiletools.gallery.extensions.config
|
import com.simplemobiletools.gallery.extensions.*
|
||||||
import com.simplemobiletools.gallery.extensions.getFileSignature
|
|
||||||
import com.simplemobiletools.gallery.extensions.getRealPathFromURI
|
|
||||||
import com.simplemobiletools.gallery.extensions.portrait
|
|
||||||
import com.simplemobiletools.gallery.helpers.GlideRotateTransformation
|
import com.simplemobiletools.gallery.helpers.GlideRotateTransformation
|
||||||
import com.simplemobiletools.gallery.helpers.MEDIUM
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import it.sephiroth.android.library.exif2.ExifInterface
|
import it.sephiroth.android.library.exif2.ExifInterface
|
||||||
import kotlinx.android.synthetic.main.pager_photo_item.view.*
|
import kotlinx.android.synthetic.main.pager_photo_item.view.*
|
||||||
|
import pl.droidsonroids.gif.GifDrawable
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileOutputStream
|
import java.io.FileOutputStream
|
||||||
import java.io.IOException
|
|
||||||
|
|
||||||
class PhotoFragment : ViewPagerFragment() {
|
class PhotoFragment : ViewPagerFragment() {
|
||||||
lateinit var medium: Medium
|
|
||||||
lateinit var view: ViewGroup
|
|
||||||
private var isFragmentVisible = false
|
private var isFragmentVisible = false
|
||||||
private var wasInit = false
|
private var wasInit = false
|
||||||
|
private var storedShowExtendedDetails = false
|
||||||
|
private var storedExtendedDetails = 0
|
||||||
|
private var gifDrawable: GifDrawable? = null
|
||||||
|
|
||||||
|
lateinit var view: ViewGroup
|
||||||
|
lateinit var medium: Medium
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||||
view = inflater.inflate(R.layout.pager_photo_item, container, false) as ViewGroup
|
view = inflater.inflate(R.layout.pager_photo_item, container, false) as ViewGroup
|
||||||
|
|
||||||
medium = arguments.getSerializable(MEDIUM) as Medium
|
if (!isFragmentVisible && activity is PhotoActivity) {
|
||||||
|
isFragmentVisible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
medium = arguments!!.getSerializable(MEDIUM) as Medium
|
||||||
if (medium.path.startsWith("content://")) {
|
if (medium.path.startsWith("content://")) {
|
||||||
val originalPath = medium.path
|
val originalPath = medium.path
|
||||||
medium.path = context.getRealPathFromURI(Uri.parse(medium.path)) ?: ""
|
medium.path = context!!.getRealPathFromURI(Uri.parse(originalPath)) ?: medium.path
|
||||||
|
|
||||||
if (medium.path.isEmpty()) {
|
if (medium.path.isEmpty()) {
|
||||||
var out: FileOutputStream? = null
|
var out: FileOutputStream? = null
|
||||||
try {
|
try {
|
||||||
var inputStream = context.contentResolver.openInputStream(Uri.parse(originalPath))
|
var inputStream = context!!.contentResolver.openInputStream(Uri.parse(originalPath))
|
||||||
val exif = ExifInterface()
|
val exif = ExifInterface()
|
||||||
exif.readExif(inputStream, ExifInterface.Options.OPTION_ALL)
|
exif.readExif(inputStream, ExifInterface.Options.OPTION_ALL)
|
||||||
val tag = exif.getTag(ExifInterface.TAG_ORIENTATION)
|
val tag = exif.getTag(ExifInterface.TAG_ORIENTATION)
|
||||||
val orientation = tag?.getValueAsInt(-1) ?: -1
|
val orientation = tag?.getValueAsInt(-1) ?: -1
|
||||||
|
inputStream = context!!.contentResolver.openInputStream(Uri.parse(originalPath))
|
||||||
inputStream = context.contentResolver.openInputStream(Uri.parse(originalPath))
|
|
||||||
val original = BitmapFactory.decodeStream(inputStream)
|
val original = BitmapFactory.decodeStream(inputStream)
|
||||||
val rotated = rotateViaMatrix(original, orientation)
|
val rotated = rotateViaMatrix(original, orientation)
|
||||||
exif.setTagValue(ExifInterface.TAG_ORIENTATION, 1)
|
exif.setTagValue(ExifInterface.TAG_ORIENTATION, 1)
|
||||||
exif.removeCompressedThumbnail()
|
exif.removeCompressedThumbnail()
|
||||||
|
|
||||||
val file = File(context.externalCacheDir, Uri.parse(originalPath).lastPathSegment)
|
val file = File(context!!.externalCacheDir, Uri.parse(originalPath).lastPathSegment)
|
||||||
out = FileOutputStream(file)
|
out = FileOutputStream(file)
|
||||||
rotated.compress(Bitmap.CompressFormat.JPEG, 100, out)
|
rotated.compress(Bitmap.CompressFormat.JPEG, 100, out)
|
||||||
medium.path = file.absolutePath
|
medium.path = file.absolutePath
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
activity.toast(R.string.unknown_error_occurred)
|
activity!!.toast(R.string.unknown_error_occurred)
|
||||||
return view
|
return view
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
|
||||||
out?.close()
|
out?.close()
|
||||||
} catch (e: IOException) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
view.subsampling_view.setOnClickListener({ photoClicked() })
|
view.subsampling_view.setOnClickListener { photoClicked() }
|
||||||
view.photo_view.apply {
|
view.gif_view.setOnClickListener { photoClicked() }
|
||||||
maximumScale = 8f
|
|
||||||
mediumScale = 3f
|
|
||||||
setOnOutsidePhotoTapListener {
|
|
||||||
photoClicked()
|
|
||||||
}
|
|
||||||
|
|
||||||
setOnPhotoTapListener { view, x, y ->
|
|
||||||
photoClicked()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
loadImage()
|
loadImage()
|
||||||
|
checkExtendedDetails()
|
||||||
|
|
||||||
wasInit = true
|
wasInit = true
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
super.onPause()
|
||||||
|
storedShowExtendedDetails = context!!.config.showExtendedDetails
|
||||||
|
storedExtendedDetails = context!!.config.extendedDetails
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
if (wasInit && (context!!.config.showExtendedDetails != storedShowExtendedDetails || context!!.config.extendedDetails != storedExtendedDetails)) {
|
||||||
|
checkExtendedDetails()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
override fun setMenuVisibility(menuVisible: Boolean) {
|
||||||
super.setMenuVisibility(menuVisible)
|
super.setMenuVisibility(menuVisible)
|
||||||
isFragmentVisible = menuVisible
|
isFragmentVisible = menuVisible
|
||||||
if (wasInit) {
|
if (wasInit) {
|
||||||
if (menuVisible) {
|
if (medium.isGif()) {
|
||||||
|
gifFragmentVisibilityChanged(menuVisible)
|
||||||
|
} else {
|
||||||
|
photoFragmentVisibilityChanged(menuVisible)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun gifFragmentVisibilityChanged(isVisible: Boolean) {
|
||||||
|
if (isVisible) {
|
||||||
|
gifDrawable?.start()
|
||||||
|
} else {
|
||||||
|
gifDrawable?.stop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun photoFragmentVisibilityChanged(isVisible: Boolean) {
|
||||||
|
if (isVisible) {
|
||||||
addZoomableView()
|
addZoomableView()
|
||||||
} else {
|
} else {
|
||||||
view.subsampling_view.apply {
|
view.subsampling_view.apply {
|
||||||
|
@ -121,7 +139,6 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun degreesForRotation(orientation: Int) = when (orientation) {
|
private fun degreesForRotation(orientation: Int) = when (orientation) {
|
||||||
8 -> 270
|
8 -> 270
|
||||||
|
@ -143,21 +160,31 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
|
|
||||||
private fun loadImage() {
|
private fun loadImage() {
|
||||||
if (medium.isGif()) {
|
if (medium.isGif()) {
|
||||||
val options = RequestOptions()
|
loadGif()
|
||||||
.priority(if (isFragmentVisible) Priority.IMMEDIATE else Priority.LOW)
|
|
||||||
.diskCacheStrategy(DiskCacheStrategy.DATA)
|
|
||||||
|
|
||||||
Glide.with(this)
|
|
||||||
.asGif()
|
|
||||||
.load(medium.path)
|
|
||||||
.transition(DrawableTransitionOptions.withCrossFade())
|
|
||||||
.apply(options)
|
|
||||||
.into(view.photo_view)
|
|
||||||
} else {
|
} else {
|
||||||
loadBitmap()
|
loadBitmap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun loadGif() {
|
||||||
|
try {
|
||||||
|
gifDrawable = if (medium.path.startsWith("content://") || medium.path.startsWith("file://")) {
|
||||||
|
GifDrawable(context!!.contentResolver, Uri.parse(medium.path))
|
||||||
|
} else {
|
||||||
|
GifDrawable(medium.path)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isFragmentVisible) {
|
||||||
|
gifDrawable!!.stop()
|
||||||
|
}
|
||||||
|
|
||||||
|
view.gif_view.setImageDrawable(gifDrawable)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
gifDrawable = null
|
||||||
|
loadBitmap()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun loadBitmap(degrees: Float = 0f) {
|
private fun loadBitmap(degrees: Float = 0f) {
|
||||||
if (degrees == 0f) {
|
if (degrees == 0f) {
|
||||||
val targetWidth = if (ViewPagerActivity.screenWidth == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenWidth
|
val targetWidth = if (ViewPagerActivity.screenWidth == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenWidth
|
||||||
|
@ -181,25 +208,25 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
addZoomableView()
|
addZoomableView()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}).into(view.photo_view)
|
}).into(view.gif_view)
|
||||||
} else {
|
} else {
|
||||||
val options = RequestOptions()
|
val options = RequestOptions()
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
.transform(GlideRotateTransformation(context, degrees))
|
.transform(GlideRotateTransformation(context!!, degrees))
|
||||||
|
|
||||||
Glide.with(this)
|
Glide.with(this)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.load(medium.path)
|
.load(medium.path)
|
||||||
.thumbnail(0.2f)
|
.thumbnail(0.2f)
|
||||||
.apply(options)
|
.apply(options)
|
||||||
.into(view.photo_view)
|
.into(view.gif_view)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addZoomableView() {
|
private fun addZoomableView() {
|
||||||
if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.visibility == View.GONE) {
|
if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.visibility == View.GONE) {
|
||||||
view.subsampling_view.apply {
|
view.subsampling_view.apply {
|
||||||
//setBitmapDecoderClass(GlideDecoder::class.java) // causing random crashes on Android 7+
|
//setBitmapDecoderClass(GlideDecoder::class.java) // causing random crashes on Android 7+, at rotating
|
||||||
maxScale = 10f
|
maxScale = 10f
|
||||||
beVisible()
|
beVisible()
|
||||||
setImage(ImageSource.uri(medium.path))
|
setImage(ImageSource.uri(medium.path))
|
||||||
|
@ -244,9 +271,9 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
if (context == null)
|
if (context == null)
|
||||||
return 2f
|
return 2f
|
||||||
|
|
||||||
return if (context.portrait && bitmapAspectRatio <= 1f) {
|
return if (context!!.portrait && bitmapAspectRatio <= 1f) {
|
||||||
ViewPagerActivity.screenHeight / height.toFloat()
|
ViewPagerActivity.screenHeight / height.toFloat()
|
||||||
} else if (!context.portrait && bitmapAspectRatio >= 1f) {
|
} else if (!context!!.portrait && bitmapAspectRatio >= 1f) {
|
||||||
ViewPagerActivity.screenWidth / width.toFloat()
|
ViewPagerActivity.screenWidth / width.toFloat()
|
||||||
} else {
|
} else {
|
||||||
2f
|
2f
|
||||||
|
@ -258,16 +285,35 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
loadBitmap(degrees)
|
loadBitmap(degrees)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun checkExtendedDetails() {
|
||||||
|
if (context!!.config.showExtendedDetails) {
|
||||||
|
view.photo_details.apply {
|
||||||
|
text = getMediumExtendedDetails(medium)
|
||||||
|
setTextColor(context.config.textColor)
|
||||||
|
beVisibleIf(text.isNotEmpty())
|
||||||
|
onGlobalLayout {
|
||||||
|
if (height != 0) {
|
||||||
|
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
||||||
|
y = context.usableScreenSize.y - height - if (context.navigationBarHeight == 0) smallMargin else 0f
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
view.photo_details.beGone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && !activity.isDestroyed) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && !activity!!.isDestroyed) {
|
||||||
Glide.with(context).clear(view.photo_view)
|
Glide.with(context).clear(view.gif_view)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||||
super.onConfigurationChanged(newConfig)
|
super.onConfigurationChanged(newConfig)
|
||||||
loadImage()
|
loadImage()
|
||||||
|
checkExtendedDetails()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun photoClicked() {
|
private fun photoClicked() {
|
||||||
|
@ -275,6 +321,13 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun fullscreenToggled(isFullscreen: Boolean) {
|
override fun fullscreenToggled(isFullscreen: Boolean) {
|
||||||
|
view.photo_details.apply {
|
||||||
|
if (visibility == View.VISIBLE) {
|
||||||
|
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
||||||
|
val fullscreenOffset = context.navigationBarHeight.toFloat() - smallMargin
|
||||||
|
val newY = context.usableScreenSize.y - height + if (isFullscreen) fullscreenOffset else -(if (context.navigationBarHeight == 0) smallMargin else 0f)
|
||||||
|
animate().y(newY)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,16 +9,13 @@ import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.util.DisplayMetrics
|
import android.util.DisplayMetrics
|
||||||
import android.util.Log
|
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import android.widget.SeekBar
|
import android.widget.SeekBar
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.extensions.getFormattedDuration
|
|
||||||
import com.simplemobiletools.commons.extensions.toast
|
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
|
import com.simplemobiletools.gallery.activities.VideoActivity
|
||||||
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
||||||
import com.simplemobiletools.gallery.extensions.*
|
import com.simplemobiletools.gallery.extensions.*
|
||||||
import com.simplemobiletools.gallery.helpers.MEDIUM
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
|
@ -29,6 +26,7 @@ import java.io.IOException
|
||||||
class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSeekBarChangeListener {
|
class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSeekBarChangeListener {
|
||||||
private val CLICK_MAX_DURATION = 150
|
private val CLICK_MAX_DURATION = 150
|
||||||
private val SLIDE_INFO_FADE_DELAY = 1000L
|
private val SLIDE_INFO_FADE_DELAY = 1000L
|
||||||
|
private val PROGRESS = "progress"
|
||||||
|
|
||||||
private var mMediaPlayer: MediaPlayer? = null
|
private var mMediaPlayer: MediaPlayer? = null
|
||||||
private var mSurfaceView: SurfaceView? = null
|
private var mSurfaceView: SurfaceView? = null
|
||||||
|
@ -36,13 +34,16 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
private var mCurrTimeView: TextView? = null
|
private var mCurrTimeView: TextView? = null
|
||||||
private var mTimerHandler: Handler? = null
|
private var mTimerHandler: Handler? = null
|
||||||
private var mSeekBar: SeekBar? = null
|
private var mSeekBar: SeekBar? = null
|
||||||
private var mTimeHolder: View? = null
|
|
||||||
|
|
||||||
private var mIsPlaying = false
|
private var mIsPlaying = false
|
||||||
private var mIsDragged = false
|
private var mIsDragged = false
|
||||||
private var mIsFullscreen = false
|
private var mIsFullscreen = false
|
||||||
private var mIsFragmentVisible = false
|
private var mIsFragmentVisible = false
|
||||||
private var mPlayOnPrepare = false
|
private var mPlayOnPrepare = false
|
||||||
|
private var mStoredShowExtendedDetails = false
|
||||||
|
private var wasEncoded = false
|
||||||
|
private var wasInit = false
|
||||||
|
private var mStoredExtendedDetails = 0
|
||||||
private var mCurrTime = 0
|
private var mCurrTime = 0
|
||||||
private var mDuration = 0
|
private var mDuration = 0
|
||||||
|
|
||||||
|
@ -59,32 +60,53 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
|
|
||||||
lateinit var mView: View
|
lateinit var mView: View
|
||||||
lateinit var medium: Medium
|
lateinit var medium: Medium
|
||||||
|
lateinit var mTimeHolder: View
|
||||||
companion object {
|
|
||||||
private val TAG = VideoFragment::class.java.simpleName
|
|
||||||
private val PROGRESS = "progress"
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
mView = inflater.inflate(R.layout.pager_video_item, container, false)
|
mView = inflater.inflate(R.layout.pager_video_item, container, false)
|
||||||
setupPlayer()
|
mTimeHolder = mView.video_time_holder
|
||||||
|
medium = arguments!!.getSerializable(MEDIUM) as Medium
|
||||||
|
|
||||||
medium = arguments.getSerializable(MEDIUM) as Medium
|
// setMenuVisibility is not called at VideoActivity (third party intent)
|
||||||
|
if (!mIsFragmentVisible && activity is VideoActivity) {
|
||||||
|
mIsFragmentVisible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
setupPlayer()
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
mCurrTime = savedInstanceState.getInt(PROGRESS)
|
mCurrTime = savedInstanceState.getInt(PROGRESS)
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
checkFullscreen()
|
checkFullscreen()
|
||||||
|
wasInit = true
|
||||||
|
|
||||||
return mView
|
return mView
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
activity.updateTextColors(mView.video_holder)
|
activity!!.updateTextColors(mView.video_holder)
|
||||||
mView.video_volume_controller.beVisibleIf(context.config.allowVideoGestures)
|
mView.video_volume_controller.beVisibleIf(context!!.config.allowVideoGestures)
|
||||||
mView.video_brightness_controller.beVisibleIf(context.config.allowVideoGestures)
|
mView.video_brightness_controller.beVisibleIf(context!!.config.allowVideoGestures)
|
||||||
|
|
||||||
|
if (context!!.config.showExtendedDetails != mStoredShowExtendedDetails || context!!.config.extendedDetails != mStoredExtendedDetails) {
|
||||||
|
checkExtendedDetails()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
super.onPause()
|
||||||
|
pauseVideo()
|
||||||
|
mStoredShowExtendedDetails = context!!.config.showExtendedDetails
|
||||||
|
mStoredExtendedDetails = context!!.config.extendedDetails
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
if (activity?.isChangingConfigurations == false) {
|
||||||
|
cleanup()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupPlayer() {
|
private fun setupPlayer() {
|
||||||
|
@ -109,21 +131,22 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
}
|
}
|
||||||
|
|
||||||
initTimeHolder()
|
initTimeHolder()
|
||||||
|
checkExtendedDetails()
|
||||||
|
initMediaPlayer()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
override fun setMenuVisibility(menuVisible: Boolean) {
|
||||||
super.setMenuVisibility(menuVisible)
|
super.setMenuVisibility(menuVisible)
|
||||||
mIsFragmentVisible = menuVisible
|
if (mIsFragmentVisible && !menuVisible) {
|
||||||
if (menuVisible) {
|
pauseVideo()
|
||||||
if (mSurfaceView != null && mSurfaceHolder!!.surface.isValid) {
|
releaseMediaPlayer()
|
||||||
initMediaPlayer()
|
|
||||||
}
|
}
|
||||||
|
mIsFragmentVisible = menuVisible
|
||||||
|
if (menuVisible && wasInit) {
|
||||||
|
initMediaPlayer()
|
||||||
if (context?.config?.autoplayVideos == true) {
|
if (context?.config?.autoplayVideos == true) {
|
||||||
playVideo()
|
playVideo()
|
||||||
}
|
}
|
||||||
} else if (mIsPlaying) {
|
|
||||||
pauseVideo()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,6 +154,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
super.onConfigurationChanged(newConfig)
|
super.onConfigurationChanged(newConfig)
|
||||||
setVideoSize()
|
setVideoSize()
|
||||||
initTimeHolder()
|
initTimeHolder()
|
||||||
|
checkExtendedDetails()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleFullscreen() {
|
private fun toggleFullscreen() {
|
||||||
|
@ -214,17 +238,17 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
mView.video_holder
|
mView.video_holder
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getCurrentVolume() = context.audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)
|
private fun getCurrentVolume() = context!!.audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)
|
||||||
|
|
||||||
private fun getCurrentBrightness() = Settings.System.getInt(activity.contentResolver, Settings.System.SCREEN_BRIGHTNESS)
|
private fun getCurrentBrightness() = Settings.System.getInt(activity!!.contentResolver, Settings.System.SCREEN_BRIGHTNESS)
|
||||||
|
|
||||||
private fun volumePercentChanged(percent: Int) {
|
private fun volumePercentChanged(percent: Int) {
|
||||||
val stream = AudioManager.STREAM_MUSIC
|
val stream = AudioManager.STREAM_MUSIC
|
||||||
val maxVolume = context.audioManager.getStreamMaxVolume(stream)
|
val maxVolume = context!!.audioManager.getStreamMaxVolume(stream)
|
||||||
val percentPerPoint = 100 / maxVolume
|
val percentPerPoint = 100 / maxVolume
|
||||||
val addPoints = percent / percentPerPoint
|
val addPoints = percent / percentPerPoint
|
||||||
val newVolume = Math.min(maxVolume, Math.max(0, mTouchDownVolume + addPoints))
|
val newVolume = Math.min(maxVolume, Math.max(0, mTouchDownVolume + addPoints))
|
||||||
context.audioManager.setStreamVolume(stream, newVolume, 0)
|
context!!.audioManager.setStreamVolume(stream, newVolume, 0)
|
||||||
|
|
||||||
val absolutePercent = ((newVolume / maxVolume.toFloat()) * 100).toInt()
|
val absolutePercent = ((newVolume / maxVolume.toFloat()) * 100).toInt()
|
||||||
mView.slide_info.apply {
|
mView.slide_info.apply {
|
||||||
|
@ -250,9 +274,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
alpha = 1f
|
alpha = 1f
|
||||||
}
|
}
|
||||||
|
|
||||||
val attributes = activity.window.attributes
|
val attributes = activity!!.window.attributes
|
||||||
attributes.screenBrightness = absolutePercent / 100f
|
attributes.screenBrightness = absolutePercent / 100f
|
||||||
activity.window.attributes = attributes
|
activity!!.window.attributes = attributes
|
||||||
|
|
||||||
mSlideInfoFadeHandler.removeCallbacksAndMessages(null)
|
mSlideInfoFadeHandler.removeCallbacksAndMessages(null)
|
||||||
mSlideInfoFadeHandler.postDelayed({
|
mSlideInfoFadeHandler.postDelayed({
|
||||||
|
@ -261,22 +285,21 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initTimeHolder() {
|
private fun initTimeHolder() {
|
||||||
mTimeHolder = mView.video_time_holder
|
|
||||||
val res = resources
|
val res = resources
|
||||||
val height = res.getNavBarHeight()
|
val height = context!!.navigationBarHeight
|
||||||
val left = mTimeHolder!!.paddingLeft
|
val left = mTimeHolder.paddingLeft
|
||||||
val top = mTimeHolder!!.paddingTop
|
val top = mTimeHolder.paddingTop
|
||||||
var right = res.getDimension(R.dimen.timer_padding).toInt()
|
var right = res.getDimension(R.dimen.timer_padding).toInt()
|
||||||
var bottom = 0
|
var bottom = 0
|
||||||
|
|
||||||
if (activity.hasNavBar()) {
|
if (hasNavBar()) {
|
||||||
if (res.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
if (res.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||||
bottom += height
|
bottom += height
|
||||||
} else {
|
} else {
|
||||||
right += height
|
right += height
|
||||||
bottom += context.navigationBarHeight
|
bottom += context!!.navigationBarHeight
|
||||||
}
|
}
|
||||||
mTimeHolder!!.setPadding(left, top, right, bottom)
|
mTimeHolder.setPadding(left, top, right, bottom)
|
||||||
}
|
}
|
||||||
|
|
||||||
mCurrTimeView = mView.video_curr_time
|
mCurrTimeView = mView.video_curr_time
|
||||||
|
@ -284,7 +307,31 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
mSeekBar!!.setOnSeekBarChangeListener(this)
|
mSeekBar!!.setOnSeekBarChangeListener(this)
|
||||||
|
|
||||||
if (mIsFullscreen)
|
if (mIsFullscreen)
|
||||||
mTimeHolder!!.visibility = View.INVISIBLE
|
mTimeHolder.beInvisible()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun hasNavBar(): Boolean {
|
||||||
|
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||||
|
val display = context!!.windowManager.defaultDisplay
|
||||||
|
|
||||||
|
val realDisplayMetrics = DisplayMetrics()
|
||||||
|
display.getRealMetrics(realDisplayMetrics)
|
||||||
|
|
||||||
|
val realHeight = realDisplayMetrics.heightPixels
|
||||||
|
val realWidth = realDisplayMetrics.widthPixels
|
||||||
|
|
||||||
|
val displayMetrics = DisplayMetrics()
|
||||||
|
display.getMetrics(displayMetrics)
|
||||||
|
|
||||||
|
val displayHeight = displayMetrics.heightPixels
|
||||||
|
val displayWidth = displayMetrics.widthPixels
|
||||||
|
|
||||||
|
realWidth - displayWidth > 0 || realHeight - displayHeight > 0
|
||||||
|
} else {
|
||||||
|
val hasMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey()
|
||||||
|
val hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK)
|
||||||
|
!hasMenuKey && !hasBackKey
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupTimeHolder() {
|
private fun setupTimeHolder() {
|
||||||
|
@ -295,7 +342,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupTimer() {
|
private fun setupTimer() {
|
||||||
activity.runOnUiThread(object : Runnable {
|
activity!!.runOnUiThread(object : Runnable {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (mMediaPlayer != null && !mIsDragged && mIsPlaying) {
|
if (mMediaPlayer != null && !mIsDragged && mIsPlaying) {
|
||||||
mCurrTime = mMediaPlayer!!.currentPosition / 1000
|
mCurrTime = mMediaPlayer!!.currentPosition / 1000
|
||||||
|
@ -328,7 +375,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
AnimationUtils.loadAnimation(activity, anim).apply {
|
AnimationUtils.loadAnimation(activity, anim).apply {
|
||||||
duration = 150
|
duration = 150
|
||||||
fillAfter = true
|
fillAfter = true
|
||||||
mTimeHolder!!.startAnimation(this)
|
mTimeHolder.startAnimation(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,6 +383,8 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
if (activity == null || !isAdded)
|
if (activity == null || !isAdded)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
initMediaPlayer()
|
||||||
|
|
||||||
mIsPlaying = !mIsPlaying
|
mIsPlaying = !mIsPlaying
|
||||||
if (mIsPlaying) {
|
if (mIsPlaying) {
|
||||||
playVideo()
|
playVideo()
|
||||||
|
@ -352,19 +401,20 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
mPlayOnPrepare = true
|
mPlayOnPrepare = true
|
||||||
}
|
}
|
||||||
mView.video_play_outline.setImageDrawable(null)
|
mView.video_play_outline.setImageDrawable(null)
|
||||||
activity.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
activity!!.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pauseVideo() {
|
private fun pauseVideo() {
|
||||||
mIsPlaying = false
|
mIsPlaying = false
|
||||||
mMediaPlayer?.pause()
|
mMediaPlayer?.pause()
|
||||||
mView.video_play_outline.setImageDrawable(resources.getDrawable(R.drawable.img_play_outline_big))
|
mView.video_play_outline.setImageDrawable(resources.getDrawable(R.drawable.img_play_outline_big))
|
||||||
activity.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
activity!!.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initMediaPlayer() {
|
private fun initMediaPlayer() {
|
||||||
if (mMediaPlayer != null)
|
if (mMediaPlayer != null || !mIsFragmentVisible) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mMediaPlayer = MediaPlayer().apply {
|
mMediaPlayer = MediaPlayer().apply {
|
||||||
|
@ -374,10 +424,18 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
setOnVideoSizeChangedListener({ mediaPlayer, width, height -> setVideoSize() })
|
setOnVideoSizeChangedListener({ mediaPlayer, width, height -> setVideoSize() })
|
||||||
setOnPreparedListener { videoPrepared(it) }
|
setOnPreparedListener { videoPrepared(it) }
|
||||||
setAudioStreamType(AudioManager.STREAM_MUSIC)
|
setAudioStreamType(AudioManager.STREAM_MUSIC)
|
||||||
prepareAsync()
|
prepare()
|
||||||
}
|
}
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
Log.e(TAG, "init media player failed $e")
|
medium.path = Uri.encode(medium.path)
|
||||||
|
if (wasEncoded) {
|
||||||
|
releaseMediaPlayer()
|
||||||
|
} else {
|
||||||
|
wasEncoded = true
|
||||||
|
mMediaPlayer = null
|
||||||
|
initMediaPlayer()
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
releaseMediaPlayer()
|
releaseMediaPlayer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -393,19 +451,6 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
mMediaPlayer!!.pause()
|
mMediaPlayer!!.pause()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
|
||||||
super.onPause()
|
|
||||||
pauseVideo()
|
|
||||||
mIsFragmentVisible = false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
if (activity?.isChangingConfigurations == false) {
|
|
||||||
cleanup()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun cleanup() {
|
private fun cleanup() {
|
||||||
pauseVideo()
|
pauseVideo()
|
||||||
mCurrTimeView?.text = 0.getFormattedDuration()
|
mCurrTimeView?.text = 0.getFormattedDuration()
|
||||||
|
@ -425,12 +470,16 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
setupTimeHolder()
|
setupTimeHolder()
|
||||||
setProgress(mCurrTime)
|
setProgress(mCurrTime)
|
||||||
|
|
||||||
if (mIsFragmentVisible && (context.config.autoplayVideos || mPlayOnPrepare))
|
if (mIsFragmentVisible && (context!!.config.autoplayVideos || mPlayOnPrepare))
|
||||||
playVideo()
|
playVideo()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun videoCompleted() {
|
private fun videoCompleted() {
|
||||||
if (listener?.videoEnded() == false && context.config.loopVideos) {
|
if (!isAdded) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listener?.videoEnded() == false && context!!.config.loopVideos) {
|
||||||
playVideo()
|
playVideo()
|
||||||
} else {
|
} else {
|
||||||
mSeekBar!!.progress = mSeekBar!!.max
|
mSeekBar!!.progress = mSeekBar!!.max
|
||||||
|
@ -440,7 +489,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun surfaceCreated(holder: SurfaceHolder) {
|
override fun surfaceCreated(holder: SurfaceHolder) {
|
||||||
|
mSurfaceHolder = holder
|
||||||
|
if (mIsFragmentVisible)
|
||||||
|
initMediaPlayer()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
|
override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
|
||||||
|
@ -461,12 +512,11 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
|
|
||||||
initMediaPlayer()
|
initMediaPlayer()
|
||||||
if (mMediaPlayer == null) {
|
if (mMediaPlayer == null) {
|
||||||
activity.toast(R.string.unknown_error_occurred)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val videoProportion = mMediaPlayer!!.videoWidth.toFloat() / mMediaPlayer!!.videoHeight.toFloat()
|
val videoProportion = mMediaPlayer!!.videoWidth.toFloat() / mMediaPlayer!!.videoHeight.toFloat()
|
||||||
val display = activity.windowManager.defaultDisplay
|
val display = activity!!.windowManager.defaultDisplay
|
||||||
val screenWidth: Int
|
val screenWidth: Int
|
||||||
val screenHeight: Int
|
val screenHeight: Int
|
||||||
|
|
||||||
|
@ -494,6 +544,25 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun checkExtendedDetails() {
|
||||||
|
if (context!!.config.showExtendedDetails) {
|
||||||
|
mView.video_details.apply {
|
||||||
|
text = getMediumExtendedDetails(medium)
|
||||||
|
setTextColor(context.config.textColor)
|
||||||
|
beVisibleIf(text.isNotEmpty())
|
||||||
|
onGlobalLayout {
|
||||||
|
if (height != 0) {
|
||||||
|
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
||||||
|
val timeHolderHeight = mTimeHolder.height - context.navigationBarHeight
|
||||||
|
y = context.usableScreenSize.y - height - timeHolderHeight - if (context.navigationBarHeight == 0) smallMargin else 0f
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mView.video_details.beGone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
||||||
if (mMediaPlayer != null && fromUser) {
|
if (mMediaPlayer != null && fromUser) {
|
||||||
setProgress(progress)
|
setProgress(progress)
|
||||||
|
@ -522,5 +591,14 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
override fun fullscreenToggled(isFullscreen: Boolean) {
|
override fun fullscreenToggled(isFullscreen: Boolean) {
|
||||||
mIsFullscreen = isFullscreen
|
mIsFullscreen = isFullscreen
|
||||||
checkFullscreen()
|
checkFullscreen()
|
||||||
|
mView.video_details.apply {
|
||||||
|
if (visibility == View.VISIBLE) {
|
||||||
|
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
||||||
|
val timeHolderHeight = mTimeHolder.height - context.navigationBarHeight.toFloat()
|
||||||
|
val fullscreenOffset = context.navigationBarHeight.toFloat() - smallMargin
|
||||||
|
val newY = context.usableScreenSize.y - height + if (mIsFullscreen) fullscreenOffset else -(timeHolderHeight + if (context.navigationBarHeight == 0) smallMargin else 0f)
|
||||||
|
animate().y(newY)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
package com.simplemobiletools.gallery.fragments
|
package com.simplemobiletools.gallery.fragments
|
||||||
|
|
||||||
import android.support.v4.app.Fragment
|
import android.support.v4.app.Fragment
|
||||||
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.gallery.extensions.config
|
||||||
|
import com.simplemobiletools.gallery.helpers.*
|
||||||
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
abstract class ViewPagerFragment : Fragment() {
|
abstract class ViewPagerFragment : Fragment() {
|
||||||
var listener: FragmentListener? = null
|
var listener: FragmentListener? = null
|
||||||
|
@ -12,4 +17,48 @@ abstract class ViewPagerFragment : Fragment() {
|
||||||
|
|
||||||
fun videoEnded(): Boolean
|
fun videoEnded(): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getMediumExtendedDetails(medium: Medium): String {
|
||||||
|
val file = File(medium.path)
|
||||||
|
if (!file.exists()) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
val path = "${file.parent.trimEnd('/')}/"
|
||||||
|
val exif = android.media.ExifInterface(medium.path)
|
||||||
|
val details = StringBuilder()
|
||||||
|
val detailsFlag = context!!.config.extendedDetails
|
||||||
|
if (detailsFlag and EXT_NAME != 0) {
|
||||||
|
medium.name.let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailsFlag and EXT_PATH != 0) {
|
||||||
|
path.let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailsFlag and EXT_SIZE != 0) {
|
||||||
|
file.length().formatSize().let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailsFlag and EXT_RESOLUTION != 0) {
|
||||||
|
file.getResolution().formatAsResolution().let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailsFlag and EXT_LAST_MODIFIED != 0) {
|
||||||
|
file.lastModified().formatLastModified().let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailsFlag and EXT_DATE_TAKEN != 0) {
|
||||||
|
path.getExifDateTaken(exif).let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailsFlag and EXT_CAMERA_MODEL != 0) {
|
||||||
|
path.getExifCameraModel(exif).let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailsFlag and EXT_EXIF_PROPERTIES != 0) {
|
||||||
|
path.getExifProperties(exif).let { if (it.isNotEmpty()) details.appendln(it) }
|
||||||
|
}
|
||||||
|
return details.toString().trim()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,6 +245,10 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
get() = prefs.getBoolean(ALLOW_VIDEO_GESTURES, true)
|
get() = prefs.getBoolean(ALLOW_VIDEO_GESTURES, true)
|
||||||
set(allowVideoGestures) = prefs.edit().putBoolean(ALLOW_VIDEO_GESTURES, allowVideoGestures).apply()
|
set(allowVideoGestures) = prefs.edit().putBoolean(ALLOW_VIDEO_GESTURES, allowVideoGestures).apply()
|
||||||
|
|
||||||
|
var showMediaCount: Boolean
|
||||||
|
get() = prefs.getBoolean(SHOW_MEDIA_COUNT, true)
|
||||||
|
set(showMediaCount) = prefs.edit().putBoolean(SHOW_MEDIA_COUNT, showMediaCount).apply()
|
||||||
|
|
||||||
var slideshowInterval: Int
|
var slideshowInterval: Int
|
||||||
get() = prefs.getInt(SLIDESHOW_INTERVAL, SLIDESHOW_DEFAULT_INTERVAL)
|
get() = prefs.getInt(SLIDESHOW_INTERVAL, SLIDESHOW_DEFAULT_INTERVAL)
|
||||||
set(slideshowInterval) = prefs.edit().putInt(SLIDESHOW_INTERVAL, slideshowInterval).apply()
|
set(slideshowInterval) = prefs.edit().putInt(SLIDESHOW_INTERVAL, slideshowInterval).apply()
|
||||||
|
@ -288,4 +292,12 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
var viewTypeFiles: Int
|
var viewTypeFiles: Int
|
||||||
get() = prefs.getInt(VIEW_TYPE_FILES, VIEW_TYPE_GRID)
|
get() = prefs.getInt(VIEW_TYPE_FILES, VIEW_TYPE_GRID)
|
||||||
set(viewTypeFiles) = prefs.edit().putInt(VIEW_TYPE_FILES, viewTypeFiles).apply()
|
set(viewTypeFiles) = prefs.edit().putInt(VIEW_TYPE_FILES, viewTypeFiles).apply()
|
||||||
|
|
||||||
|
var showExtendedDetails: Boolean
|
||||||
|
get() = prefs.getBoolean(SHOW_EXTENDED_DETAILS, false)
|
||||||
|
set(showExtendedDetails) = prefs.edit().putBoolean(SHOW_EXTENDED_DETAILS, showExtendedDetails).apply()
|
||||||
|
|
||||||
|
var extendedDetails: Int
|
||||||
|
get() = prefs.getInt(EXTENDED_DETAILS, EXT_RESOLUTION or EXT_LAST_MODIFIED or EXT_EXIF_PROPERTIES)
|
||||||
|
set(extendedDetails) = prefs.edit().putInt(EXTENDED_DETAILS, extendedDetails).apply()
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,12 @@ val HIDE_SYSTEM_UI = "hide_system_ui"
|
||||||
val REPLACE_SHARE_WITH_ROTATE = "replace_share_with_rotate"
|
val REPLACE_SHARE_WITH_ROTATE = "replace_share_with_rotate"
|
||||||
val DELETE_EMPTY_FOLDERS = "delete_empty_folders"
|
val DELETE_EMPTY_FOLDERS = "delete_empty_folders"
|
||||||
val ALLOW_VIDEO_GESTURES = "allow_video_gestures"
|
val ALLOW_VIDEO_GESTURES = "allow_video_gestures"
|
||||||
|
val SHOW_MEDIA_COUNT = "show_media_count"
|
||||||
val TEMP_FOLDER_PATH = "temp_folder_path"
|
val TEMP_FOLDER_PATH = "temp_folder_path"
|
||||||
val VIEW_TYPE_FOLDERS = "view_type_folders"
|
val VIEW_TYPE_FOLDERS = "view_type_folders"
|
||||||
val VIEW_TYPE_FILES = "view_type_files"
|
val VIEW_TYPE_FILES = "view_type_files"
|
||||||
|
val SHOW_EXTENDED_DETAILS = "show_extended_details"
|
||||||
|
val EXTENDED_DETAILS = "extended_details"
|
||||||
|
|
||||||
// slideshow
|
// slideshow
|
||||||
val SLIDESHOW_INTERVAL = "slideshow_interval"
|
val SLIDESHOW_INTERVAL = "slideshow_interval"
|
||||||
|
@ -53,21 +56,19 @@ val SLIDESHOW_DEFAULT_INTERVAL = 5
|
||||||
val SLIDESHOW_SCROLL_DURATION = 500L
|
val SLIDESHOW_SCROLL_DURATION = 500L
|
||||||
|
|
||||||
val NOMEDIA = ".nomedia"
|
val NOMEDIA = ".nomedia"
|
||||||
|
val MAX_COLUMN_COUNT = 20
|
||||||
|
|
||||||
val DIRECTORY = "directory"
|
val DIRECTORY = "directory"
|
||||||
val MEDIUM = "medium"
|
val MEDIUM = "medium"
|
||||||
|
val PATH = "path"
|
||||||
val GET_IMAGE_INTENT = "get_image_intent"
|
val GET_IMAGE_INTENT = "get_image_intent"
|
||||||
val GET_VIDEO_INTENT = "get_video_intent"
|
val GET_VIDEO_INTENT = "get_video_intent"
|
||||||
val GET_ANY_INTENT = "get_any_intent"
|
val GET_ANY_INTENT = "get_any_intent"
|
||||||
val SET_WALLPAPER_INTENT = "set_wallpaper_intent"
|
val SET_WALLPAPER_INTENT = "set_wallpaper_intent"
|
||||||
val DIRECTORIES = "directories2"
|
val DIRECTORIES = "directories2"
|
||||||
val IS_VIEW_INTENT = "is_view_intent"
|
val IS_VIEW_INTENT = "is_view_intent"
|
||||||
val IS_FROM_GALLERY = "is_from_gallery"
|
|
||||||
val PICKED_PATHS = "picked_paths"
|
val PICKED_PATHS = "picked_paths"
|
||||||
|
|
||||||
val REQUEST_EDIT_IMAGE = 1
|
|
||||||
val REQUEST_SET_AS = 2
|
|
||||||
|
|
||||||
// rotations
|
// rotations
|
||||||
val ROTATE_BY_SYSTEM_SETTING = 0
|
val ROTATE_BY_SYSTEM_SETTING = 0
|
||||||
val ROTATE_BY_DEVICE_ROTATION = 1
|
val ROTATE_BY_DEVICE_ROTATION = 1
|
||||||
|
@ -85,3 +86,16 @@ val GIFS = 4
|
||||||
// view types
|
// view types
|
||||||
val VIEW_TYPE_GRID = 1
|
val VIEW_TYPE_GRID = 1
|
||||||
val VIEW_TYPE_LIST = 2
|
val VIEW_TYPE_LIST = 2
|
||||||
|
|
||||||
|
// extended details values
|
||||||
|
val EXT_NAME = 1
|
||||||
|
val EXT_PATH = 2
|
||||||
|
val EXT_SIZE = 4
|
||||||
|
val EXT_RESOLUTION = 8
|
||||||
|
val EXT_LAST_MODIFIED = 16
|
||||||
|
val EXT_DATE_TAKEN = 32
|
||||||
|
val EXT_CAMERA_MODEL = 64
|
||||||
|
val EXT_EXIF_PROPERTIES = 128
|
||||||
|
val EXT_DURATION = 256
|
||||||
|
val EXT_ARTIST = 512
|
||||||
|
val EXT_ALBUM = 1024
|
||||||
|
|
|
@ -42,11 +42,9 @@ class GlideDecoder : ImageDecoder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun drawableToBitmap(drawable: Drawable): Bitmap {
|
private fun drawableToBitmap(drawable: Drawable): Bitmap {
|
||||||
if (drawable is BitmapDrawable) {
|
if (drawable is BitmapDrawable && drawable.bitmap != null) {
|
||||||
if (drawable.bitmap != null) {
|
|
||||||
return drawable.bitmap
|
return drawable.bitmap
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
val bitmap = if (drawable.intrinsicWidth <= 0 || drawable.intrinsicHeight <= 0) {
|
val bitmap = if (drawable.intrinsicWidth <= 0 || drawable.intrinsicHeight <= 0) {
|
||||||
Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
|
Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
|
||||||
|
|
|
@ -62,9 +62,12 @@ class MediaFetcher(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSelectionQuery(path: String): String {
|
private fun getSelectionQuery(path: String): String? {
|
||||||
val dataQuery = "${MediaStore.Images.Media.DATA} LIKE ?"
|
val dataQuery = "${MediaStore.Images.Media.DATA} LIKE ?"
|
||||||
return if (path.isEmpty()) {
|
return if (path.isEmpty()) {
|
||||||
|
if (context.isAndroidFour())
|
||||||
|
return null
|
||||||
|
|
||||||
var query = "($dataQuery)"
|
var query = "($dataQuery)"
|
||||||
if (context.hasExternalSDCard()) {
|
if (context.hasExternalSDCard()) {
|
||||||
query += " OR ($dataQuery)"
|
query += " OR ($dataQuery)"
|
||||||
|
@ -75,9 +78,16 @@ class MediaFetcher(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSelectionArgsQuery(path: String): Array<String> {
|
private fun getSelectionArgsQuery(path: String): Array<String>? {
|
||||||
return if (path.isEmpty()) {
|
return if (path.isEmpty()) {
|
||||||
if (context.hasExternalSDCard()) arrayOf("${context.internalStoragePath}/%", "${context.sdCardPath}/%") else arrayOf("${context.internalStoragePath}/%")
|
if (context.isAndroidFour())
|
||||||
|
return null
|
||||||
|
|
||||||
|
if (context.hasExternalSDCard()) {
|
||||||
|
arrayOf("${context.internalStoragePath}/%", "${context.sdCardPath}/%")
|
||||||
|
} else {
|
||||||
|
arrayOf("${context.internalStoragePath}/%")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
arrayOf("$path/%", "$path/%/%")
|
arrayOf("$path/%", "$path/%/%")
|
||||||
}
|
}
|
||||||
|
@ -100,8 +110,8 @@ class MediaFetcher(val context: Context) {
|
||||||
if (shouldStop)
|
if (shouldStop)
|
||||||
break
|
break
|
||||||
|
|
||||||
val path = cur.getStringValue(MediaStore.Images.Media.DATA)
|
val path = cur.getStringValue(MediaStore.Images.Media.DATA).trim()
|
||||||
var filename = cur.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) ?: ""
|
var filename = cur.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)?.trim() ?: ""
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
filename = path.getFilenameFromPath()
|
filename = path.getFilenameFromPath()
|
||||||
|
|
||||||
|
|
|
@ -4,20 +4,17 @@ import com.simplemobiletools.commons.helpers.*
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
data class Directory(val path: String, val tmb: String, val name: String, var mediaCnt: Int, val modified: Long, val taken: Long,
|
data class Directory(val path: String, val tmb: String, val name: String, var mediaCnt: Int, val modified: Long, val taken: Long,
|
||||||
var size: Long) : Serializable, Comparable<Directory> {
|
val size: Long) : Serializable, Comparable<Directory> {
|
||||||
companion object {
|
companion object {
|
||||||
private val serialVersionUID = -6553345863555455L
|
private val serialVersionUID = -6553345863555455L
|
||||||
var sorting: Int = 0
|
var sorting: Int = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addSize(bytes: Long) {
|
|
||||||
size += bytes
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun compareTo(other: Directory): Int {
|
override fun compareTo(other: Directory): Int {
|
||||||
var result: Int
|
var result: Int
|
||||||
when {
|
when {
|
||||||
sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||||
|
sorting and SORT_BY_PATH != 0 -> result = AlphanumericComparator().compare(path.toLowerCase(), other.path.toLowerCase())
|
||||||
sorting and SORT_BY_SIZE != 0 -> result = when {
|
sorting and SORT_BY_SIZE != 0 -> result = when {
|
||||||
size == other.size -> 0
|
size == other.size -> 0
|
||||||
size > other.size -> 1
|
size > other.size -> 1
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package com.simplemobiletools.gallery.models
|
package com.simplemobiletools.gallery.models
|
||||||
|
|
||||||
import com.simplemobiletools.commons.extensions.getMimeType
|
import com.simplemobiletools.commons.extensions.getMimeTypeFromPath
|
||||||
import com.simplemobiletools.commons.extensions.isGif
|
import com.simplemobiletools.commons.extensions.isGif
|
||||||
import com.simplemobiletools.commons.extensions.isPng
|
import com.simplemobiletools.commons.extensions.isPng
|
||||||
import com.simplemobiletools.commons.helpers.*
|
import com.simplemobiletools.commons.helpers.*
|
||||||
import java.io.File
|
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
data class Medium(var name: String, var path: String, val video: Boolean, val modified: Long, val taken: Long, val size: Long) : Serializable, Comparable<Medium> {
|
data class Medium(var name: String, var path: String, val video: Boolean, val modified: Long, val taken: Long, val size: Long) : Serializable, Comparable<Medium> {
|
||||||
|
@ -21,7 +20,7 @@ data class Medium(var name: String, var path: String, val video: Boolean, val mo
|
||||||
|
|
||||||
fun isImage() = !isGif() && !video
|
fun isImage() = !isGif() && !video
|
||||||
|
|
||||||
fun getMimeType() = File(path).getMimeType()
|
fun getMimeType() = path.getMimeTypeFromPath()
|
||||||
|
|
||||||
override fun compareTo(other: Medium): Int {
|
override fun compareTo(other: Medium): Int {
|
||||||
var result: Int
|
var result: Int
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.util.AttributeSet
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
|
||||||
class MySquareImageView : ImageView {
|
class MySquareImageView : ImageView {
|
||||||
var isVerticalScrolling = true
|
var isHorizontalScrolling = false
|
||||||
|
|
||||||
constructor(context: Context) : super(context)
|
constructor(context: Context) : super(context)
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class MySquareImageView : ImageView {
|
||||||
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
|
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
|
||||||
|
|
||||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||||
val spec = if (isVerticalScrolling) widthMeasureSpec else heightMeasureSpec
|
val spec = if (isHorizontalScrolling) heightMeasureSpec else widthMeasureSpec
|
||||||
super.onMeasure(spec, spec)
|
super.onMeasure(spec, spec)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,26 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_use_english_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
|
android:id="@+id/settings_use_english"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/use_english_language"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_show_hidden_folders_holder"
|
android:id="@+id/settings_show_hidden_folders_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -288,6 +308,26 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_app_password_protection_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
|
android:id="@+id/settings_app_password_protection"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/password_protect_whole_app"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_delete_empty_folders_holder"
|
android:id="@+id/settings_delete_empty_folders_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -328,6 +368,85 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_show_media_count_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
|
android:id="@+id/settings_show_media_count"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/show_media_count"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_keep_last_modified_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
|
android:id="@+id/settings_keep_last_modified"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/keep_last_modified"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_show_extended_details_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
|
android:id="@+id/settings_show_extended_details"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/show_extended_details"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_manage_extended_details_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_manage_extended_details"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/manage_extended_details"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_screen_rotation_holder"
|
android:id="@+id/settings_screen_rotation_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -28,6 +28,14 @@
|
||||||
android:paddingTop="@dimen/medium_margin"
|
android:paddingTop="@dimen/medium_margin"
|
||||||
android:text="@string/name"/>
|
android:text="@string/name"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyCompatRadioButton
|
||||||
|
android:id="@+id/sorting_dialog_radio_path"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/medium_margin"
|
||||||
|
android:paddingTop="@dimen/medium_margin"
|
||||||
|
android:text="@string/path"/>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyCompatRadioButton
|
<com.simplemobiletools.commons.views.MyCompatRadioButton
|
||||||
android:id="@+id/sorting_dialog_radio_size"
|
android:id="@+id/sorting_dialog_radio_size"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
26
app/src/main/res/layout/dialog_delete_with_remember.xml
Normal file
26
app/src/main/res/layout/dialog_delete_with_remember.xml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/delete_remember_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="@dimen/big_margin"
|
||||||
|
android:paddingRight="@dimen/big_margin"
|
||||||
|
android:paddingTop="@dimen/big_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/delete_remember_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:text="@string/proceed_with_deletion"
|
||||||
|
android:textSize="@dimen/bigger_text_size"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/delete_remember_checkbox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/delete_remember_title"
|
||||||
|
android:text="@string/do_not_ask_again"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
113
app/src/main/res/layout/dialog_manage_extended_details.xml
Normal file
113
app/src/main/res/layout/dialog_manage_extended_details.xml
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/manage_extended_details_scrollview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/manage_extended_details_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
|
android:paddingRight="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/medium_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/filename"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_path"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/path"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_size"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/size"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_resolution"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/resolution"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_last_modified"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/last_modified"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_date_taken"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/date_taken"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_camera"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/camera"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_exif"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/exif"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/divider_weak"
|
||||||
|
android:importantForAccessibility="no"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_duration"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/duration"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_artist"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/artist"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/manage_extended_details_album"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:text="@string/album"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
|
@ -1,10 +1,54 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<RelativeLayout
|
||||||
<android.support.v7.widget.RecyclerView
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/media_grid"
|
android:id="@+id/media_grid_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyScalableRecyclerView
|
||||||
|
android:id="@+id/media_grid"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scrollbars="none"
|
||||||
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
||||||
app:spanCount="@integer/media_columns_vertical_scroll"/>
|
app:spanCount="@integer/media_columns_vertical_scroll"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.FastScroller
|
||||||
|
android:id="@+id/media_vertical_fastscroller"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingStart="@dimen/normal_margin">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/fastscroller_handle_vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:alpha="0"
|
||||||
|
android:background="@drawable/fastscroller_handle_vertical"/>
|
||||||
|
|
||||||
|
</com.simplemobiletools.commons.views.FastScroller>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.FastScroller
|
||||||
|
android:id="@+id/media_horizontal_fastscroller"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:paddingTop="@dimen/normal_margin">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/fastscroller_handle_horizontal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:alpha="0"
|
||||||
|
android:background="@drawable/fastscroller_handle_horizontal"/>
|
||||||
|
|
||||||
|
</com.simplemobiletools.commons.views.FastScroller>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
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"
|
||||||
android:id="@+id/photo_holder"
|
android:id="@+id/photo_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.github.chrisbanes.photoview.PhotoView
|
<ImageView
|
||||||
android:id="@+id/photo_view"
|
android:id="@+id/gif_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="fitCenter"/>
|
||||||
|
|
||||||
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||||
android:id="@+id/subsampling_view"
|
android:id="@+id/subsampling_view"
|
||||||
|
@ -16,4 +18,17 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/photo_details"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_marginLeft="@dimen/small_margin"
|
||||||
|
android:layout_marginRight="@dimen/small_margin"
|
||||||
|
android:background="@color/gradient_grey_start"
|
||||||
|
android:padding="@dimen/small_margin"
|
||||||
|
android:textSize="@dimen/smaller_text_size"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="My image\nAnother line"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
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"
|
||||||
android:id="@+id/video_holder"
|
android:id="@+id/video_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
@ -50,6 +51,19 @@
|
||||||
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.commons.views.MyTextView
|
||||||
|
android:id="@+id/video_details"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_marginLeft="@dimen/small_margin"
|
||||||
|
android:layout_marginRight="@dimen/small_margin"
|
||||||
|
android:background="@color/gradient_grey_start"
|
||||||
|
android:padding="@dimen/small_margin"
|
||||||
|
android:textSize="@dimen/smaller_text_size"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="My video\nAnother line"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/video_time_holder"
|
android:id="@+id/video_time_holder"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -46,6 +46,14 @@
|
||||||
android:icon="@drawable/ic_select_all"
|
android:icon="@drawable/ic_select_all"
|
||||||
android:title="@string/select_all"
|
android:title="@string/select_all"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/cab_open_with"
|
||||||
|
android:title="@string/open_with"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/cab_set_as"
|
||||||
|
android:title="@string/set_as"
|
||||||
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_copy_to"
|
android:id="@+id/cab_copy_to"
|
||||||
android:title="@string/copy_to"
|
android:title="@string/copy_to"
|
||||||
|
|
|
@ -21,7 +21,19 @@
|
||||||
android:id="@+id/menu_rotate"
|
android:id="@+id/menu_rotate"
|
||||||
android:icon="@drawable/ic_rotate_right"
|
android:icon="@drawable/ic_rotate_right"
|
||||||
android:title="@string/rotate"
|
android:title="@string/rotate"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom">
|
||||||
|
<menu>
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_rotate_right"
|
||||||
|
android:title="@string/rotate_right"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_rotate_left"
|
||||||
|
android:title="@string/rotate_left"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_rotate_one_eighty"
|
||||||
|
android:title="@string/rotate_one_eighty"/>
|
||||||
|
</menu>
|
||||||
|
</item>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_share_2"
|
android:id="@+id/menu_share_2"
|
||||||
android:icon="@drawable/ic_share"
|
android:icon="@drawable/ic_share"
|
||||||
|
@ -29,7 +41,11 @@
|
||||||
android:visible="false"
|
android:visible="false"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/slideshow"
|
android:id="@+id/menu_lock_orientation"
|
||||||
|
android:title="@string/lock_orientation"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_slideshow"
|
||||||
android:title="@string/slideshow"
|
android:title="@string/slideshow"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
|
@ -72,11 +88,11 @@
|
||||||
android:title="@string/properties"
|
android:title="@string/properties"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/show_on_map"
|
android:id="@+id/menu_show_on_map"
|
||||||
android:title="@string/show_on_map"
|
android:title="@string/show_on_map"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/settings"
|
android:id="@+id/menu_settings"
|
||||||
android:title="@string/settings"
|
android:title="@string/settings"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
android:icon="@drawable/ic_share"
|
android:icon="@drawable/ic_share"
|
||||||
android:title="@string/share"
|
android:title="@string/share"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_properties"
|
||||||
|
android:icon="@drawable/ic_info"
|
||||||
|
android:title="@string/properties"
|
||||||
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_edit"
|
android:id="@+id/menu_edit"
|
||||||
android:icon="@drawable/ic_edit"
|
android:icon="@drawable/ic_edit"
|
||||||
|
|
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
BIN
app/src/main/res/mipmap-nodpi/ic_launcher_foreground.png
Normal file
BIN
app/src/main/res/mipmap-nodpi/ic_launcher_foreground.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Gallery</string>
|
<string name="app_launcher_name">Gallery</string>
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="open_camera">Open camera</string>
|
<string name="open_camera">Open camera</string>
|
||||||
<string name="open_with">Open with</string>
|
|
||||||
<string name="no_app_found">No valid app found</string>
|
|
||||||
<string name="hidden">(hidden)</string>
|
<string name="hidden">(hidden)</string>
|
||||||
<string name="pin_folder">Pin folder</string>
|
<string name="pin_folder">Pin folder</string>
|
||||||
<string name="unpin_folder">Unpin folder</string>
|
<string name="unpin_folder">Unpin folder</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Change cover image</string>
|
<string name="change_cover_image">Change cover image</string>
|
||||||
<string name="select_photo">Select photo</string>
|
<string name="select_photo">Select photo</string>
|
||||||
<string name="use_default">Use default</string>
|
<string name="use_default">Use default</string>
|
||||||
<string name="set_as">Set as</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brightness</string>
|
<string name="brightness">Brightness</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<string name="include_folders">Included folders</string>
|
<string name="include_folders">Included folders</string>
|
||||||
<string name="manage_included_folders">Manage included folders</string>
|
<string name="manage_included_folders">Manage included folders</string>
|
||||||
<string name="add_folder">Add folder</string>
|
<string name="add_folder">Add folder</string>
|
||||||
<string name="included_activity_placeholder">If you have some folders which contain media, but were not recognized by the app, you can add them manually here.</string>
|
<string name="included_activity_placeholder">If you have some folders which contain media, but were not recognized by the app, you can add them manually here.\n\nAdding some items here will not exclude any other folder.</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Resize</string>
|
<string name="resize">Resize</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galerie</string>
|
<string name="app_launcher_name">Galerie</string>
|
||||||
<string name="edit">Upravit</string>
|
<string name="edit">Upravit</string>
|
||||||
<string name="open_camera">Spustit fotoaparát</string>
|
<string name="open_camera">Spustit fotoaparát</string>
|
||||||
<string name="open_with">Otevřít pomocí</string>
|
|
||||||
<string name="no_app_found">Nebyla nalezena žádná vhodná aplikace</string>
|
|
||||||
<string name="hidden">(skryté)</string>
|
<string name="hidden">(skryté)</string>
|
||||||
<string name="pin_folder">Připnout složku</string>
|
<string name="pin_folder">Připnout složku</string>
|
||||||
<string name="unpin_folder">Odepnout složku</string>
|
<string name="unpin_folder">Odepnout složku</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Change cover image</string>
|
<string name="change_cover_image">Change cover image</string>
|
||||||
<string name="select_photo">Select photo</string>
|
<string name="select_photo">Select photo</string>
|
||||||
<string name="use_default">Use default</string>
|
<string name="use_default">Use default</string>
|
||||||
<string name="set_as">Nastavit jako</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brightness</string>
|
<string name="brightness">Brightness</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galerie</string>
|
<string name="app_launcher_name">Galerie</string>
|
||||||
<string name="edit">Bearbeiten</string>
|
<string name="edit">Bearbeiten</string>
|
||||||
<string name="open_camera">Kamera öffnen</string>
|
<string name="open_camera">Kamera öffnen</string>
|
||||||
<string name="open_with">Öffnen mit</string>
|
|
||||||
<string name="no_app_found">Keine passende App gefunden</string>
|
|
||||||
<string name="hidden">(versteckt)</string>
|
<string name="hidden">(versteckt)</string>
|
||||||
<string name="pin_folder">Ordner anheften</string>
|
<string name="pin_folder">Ordner anheften</string>
|
||||||
<string name="unpin_folder">Ordner loslösen</string>
|
<string name="unpin_folder">Ordner loslösen</string>
|
||||||
|
@ -14,7 +12,7 @@
|
||||||
<string name="folder_view">Ansicht: Als Ordner</string>
|
<string name="folder_view">Ansicht: Als Ordner</string>
|
||||||
<string name="other_folder">Ordner wählen</string>
|
<string name="other_folder">Ordner wählen</string>
|
||||||
<string name="show_on_map">Auf Karte zeigen</string>
|
<string name="show_on_map">Auf Karte zeigen</string>
|
||||||
<string name="unknown_location">Unbekannter Ort</string>
|
<string name="unknown_location">Unbekannter Pfad</string>
|
||||||
<string name="no_map_application">Keine Karten-App gefunden</string>
|
<string name="no_map_application">Keine Karten-App gefunden</string>
|
||||||
<string name="no_camera_app_found">Keine Kamera-App gefunden</string>
|
<string name="no_camera_app_found">Keine Kamera-App gefunden</string>
|
||||||
<string name="increase_column_count">Kacheln verkleinern</string>
|
<string name="increase_column_count">Kacheln verkleinern</string>
|
||||||
|
@ -22,12 +20,14 @@
|
||||||
<string name="change_cover_image">Coverbild ändern</string>
|
<string name="change_cover_image">Coverbild ändern</string>
|
||||||
<string name="select_photo">Auswählen</string>
|
<string name="select_photo">Auswählen</string>
|
||||||
<string name="use_default">Standard</string>
|
<string name="use_default">Standard</string>
|
||||||
<string name="set_as">Festlegen als</string>
|
|
||||||
<string name="volume">Lautstärke</string>
|
<string name="volume">Lautstärke</string>
|
||||||
<string name="brightness">Helligkeit</string>
|
<string name="brightness">Helligkeit</string>
|
||||||
|
<string name="do_not_ask_again">Nicht erneut fragen (in dieser Sitzung)</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Medienfilter</string>
|
<string name="filter_media">Filter</string>
|
||||||
<string name="images">Bilder</string>
|
<string name="images">Bilder</string>
|
||||||
<string name="videos">Videos</string>
|
<string name="videos">Videos</string>
|
||||||
<string name="gifs">GIFs</string>
|
<string name="gifs">GIFs</string>
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
<string name="change_filters_underlined"><u>Filter ändern</u></string>
|
<string name="change_filters_underlined"><u>Filter ändern</u></string>
|
||||||
|
|
||||||
<!-- Hide / Exclude -->
|
<!-- Hide / Exclude -->
|
||||||
<string name="hide_folder_description">Diese Funktion versteckt ausgewählte Ordner (auch für andere Apps), indem dort im Dateisystem eine \'.nomedia\'-Datei abgelegt wird. Dadurch werden auch deren Unterordner versteckt. Solche Ordner werden nur gezeigt, wenn die Einstellung \'Versteckte Ordner zeigen\' aktiv ist (auch andere Apps bieten üblicherweise eine solche Option). Fortfahren?</string>
|
<string name="hide_folder_description">Diese Funktion versteckt die ausgewählten Ordner (auch für andere Apps), indem dort im Dateisystem eine \'.nomedia\'-Datei abgelegt wird. Dadurch werden auch deren Unterordner versteckt. Solche Ordner werden nur gezeigt, wenn die Einstellung \'Versteckte Ordner zeigen\' aktiv ist (auch andere Apps bieten üblicherweise eine solche Option). Fortfahren?</string>
|
||||||
<string name="exclude">Ordner ausblenden</string>
|
<string name="exclude">Ordner ausblenden</string>
|
||||||
<string name="excluded_folders">Ausgeblendete Ordner</string>
|
<string name="excluded_folders">Ausgeblendete Ordner</string>
|
||||||
<string name="manage_excluded_folders">Ausgeblendete Ordner verwalten</string>
|
<string name="manage_excluded_folders">Ausgeblendete Ordner verwalten</string>
|
||||||
<string name="exclude_folder_description">Diese Funktion blendet ausgewählte Ordner und deren Unterordner aus (nur in dieser App). Ausgeblendete Ordner können in den Einstellungen verwaltet werden.</string>
|
<string name="exclude_folder_description">Diese Funktion blendet die ausgewählten Ordner und deren Unterordner aus (nur in dieser App). Ausgeblendete Ordner können in den Einstellungen verwaltet werden.</string>
|
||||||
<string name="exclude_folder_parent">Möchten Sie stattdessen einen höherliegenden Ordner ausblenden?</string>
|
<string name="exclude_folder_parent">Möchten Sie stattdessen einen höherliegenden Ordner ausblenden?</string>
|
||||||
<string name="excluded_activity_placeholder">\'Ordner ausblenden\' wird ausgewählte Ordner und deren Unterordner nur in dieser App ausblenden. Andere Apps werden solche Ordner weiterhin anzeigen.\\n\\nWenn Sie Ordner auch für andere Apps verstecken wollen, verwenden Sie dafür die Funktion \'Ordner verstecken\'.</string>
|
<string name="excluded_activity_placeholder">\'Ordner ausblenden\' wird ausgewählte Ordner und deren Unterordner nur in dieser App ausblenden. Andere Apps werden solche Ordner weiterhin anzeigen.\\n\\nWenn Sie Ordner auch für andere Apps verstecken wollen, verwenden Sie dafür die Funktion \'Ordner verstecken\'.</string>
|
||||||
<string name="remove_all">Alle entfernen</string>
|
<string name="remove_all">Alle entfernen</string>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<string name="image_editing_failed">Bildbearbeitung fehlgeschlagen</string>
|
<string name="image_editing_failed">Bildbearbeitung fehlgeschlagen</string>
|
||||||
<string name="edit_image_with">Bild bearbeiten mit</string>
|
<string name="edit_image_with">Bild bearbeiten mit</string>
|
||||||
<string name="no_editor_found">Keine Bildeditor-App gefunden</string>
|
<string name="no_editor_found">Keine Bildeditor-App gefunden</string>
|
||||||
<string name="unknown_file_location">Unbekannter Dateiort</string>
|
<string name="unknown_file_location">Unbekannter Dateipfad</string>
|
||||||
<string name="error_saving_file">Konnte Quelldatei nicht überschreiben</string>
|
<string name="error_saving_file">Konnte Quelldatei nicht überschreiben</string>
|
||||||
<string name="rotate_left">Nach links drehen</string>
|
<string name="rotate_left">Nach links drehen</string>
|
||||||
<string name="rotate_right">Nach rechts drehen</string>
|
<string name="rotate_right">Nach rechts drehen</string>
|
||||||
|
@ -103,9 +103,9 @@
|
||||||
<string name="no_media_for_slideshow">Keine Medien für Diashow gefunden</string>
|
<string name="no_media_for_slideshow">Keine Medien für Diashow gefunden</string>
|
||||||
|
|
||||||
<!-- View types -->
|
<!-- View types -->
|
||||||
<string name="change_view_type">Change view type</string>
|
<string name="change_view_type">Darstellung ändern</string>
|
||||||
<string name="grid">Grid</string>
|
<string name="grid">Gitter</string>
|
||||||
<string name="list">List</string>
|
<string name="list">Liste</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Versteckte Ordner zeigen</string>
|
<string name="show_hidden_media">Versteckte Ordner zeigen</string>
|
||||||
|
@ -124,17 +124,20 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Systemleisten ausblenden im Vollbild</string>
|
<string name="hide_system_ui_at_fullscreen">Systemleisten ausblenden im Vollbild</string>
|
||||||
<string name="delete_empty_folders">Nach Löschen leere Ordner löschen</string>
|
<string name="delete_empty_folders">Nach Löschen leere Ordner löschen</string>
|
||||||
<string name="allow_video_gestures">Gesten für Videolautstärke/Helligkeit</string>
|
<string name="allow_video_gestures">Gesten für Videolautstärke/Helligkeit</string>
|
||||||
|
<string name="show_media_count">Medienanzahl bei Ordnern anzeigen</string>
|
||||||
<string name="replace_share_with_rotate">Teilen/Drehen im Vollbild-Menü vertauschen</string>
|
<string name="replace_share_with_rotate">Teilen/Drehen im Vollbild-Menü vertauschen</string>
|
||||||
|
<string name="show_extended_details">Eigenschaften anzeigen im Vollbild</string>
|
||||||
|
<string name="manage_extended_details">Eigenschaften auswählen</string>
|
||||||
|
|
||||||
<!-- 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">Eine schlichte Galerie zum Betrachten von Bildern und Videos ohne Werbung.</string>
|
<string name="app_short_description">Eine schlichte Galerie zum Betrachten von Bildern und Videos ohne Werbung.</string>
|
||||||
<string name="app_long_description">
|
<string name="app_long_description">
|
||||||
Ein schlichtes Tool zum Betrachten von Bildern und Videos. Die Medien können nach Datum, Größe, Name sowie auf- oder absteigend sortiert angezeigt werden, in Bilder kann 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, verschoben werden. Bilder können zugeschnitten, gedreht oder als Hintergrund festgelegt werden, direkt aus der App heraus.
|
Eine schlichte App zum Betrachten von Bildern und Videos. Die Medien können nach Datum, Größe, Name sowie auf- oder absteigend sortiert werden, in Bilder kann auch hineingezoomt werden. Die Vorschau-Kacheln werden in mehreren Spalten abhängig von der Displaygröße angezeigt, die Spaltenanzahl ist mit Zweifingergesten änderbar. Die Medien können umbenannt, geteilt, gelöscht, kopiert und verschoben werden. Bilder können direkt aus der App heraus zugeschnitten, gedreht oder als Hintergrund festgelegt werden.
|
||||||
|
|
||||||
Die Galerie bietet auch für Drittparteien einige Funktionen an: zum Vorschauen von Bildern / Videos, zum Hinzufügen von Anhängen bei eMail-Clients, etc. Sie ist perfekt für den täglichen Gebrauch.
|
Diese Galerie bietet auch für Drittanbieter einige Funktionen an: zum Vorschauen von Bildern / Videos, zum Hinzufügen von Anhängen bei Email-Apps, etc. Sie ist perfekt für den täglichen Gebrauch.
|
||||||
|
|
||||||
Beinhaltet keine Werbung oder unnötige Berechtigungen. Sie ist komplett Open Source, verwendete Farben sind anpassbar.
|
Beinhaltet keine Werbung oder unnötigen Berechtigungen. Sie ist komplett Open Source, verwendete Farben sind anpassbar.
|
||||||
|
|
||||||
Diese App ist nur eine aus einer größeren Serie von schlichten Apps. Der Rest davon findet sich auf http://www.simplemobiletools.com
|
Diese App ist nur eine aus einer größeren Serie von schlichten Apps. Der Rest davon findet sich auf http://www.simplemobiletools.com
|
||||||
</string>
|
</string>
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galería</string>
|
<string name="app_launcher_name">Galería</string>
|
||||||
<string name="edit">Editar</string>
|
<string name="edit">Editar</string>
|
||||||
<string name="open_camera">Abrir cámara</string>
|
<string name="open_camera">Abrir cámara</string>
|
||||||
<string name="open_with">Abrir con…</string>
|
|
||||||
<string name="no_app_found">No se encontró una aplicación válida</string>
|
|
||||||
<string name="hidden">(oculto)</string>
|
<string name="hidden">(oculto)</string>
|
||||||
<string name="pin_folder">Fijar carpeta</string>
|
<string name="pin_folder">Fijar carpeta</string>
|
||||||
<string name="unpin_folder">No fijar carpeta</string>
|
<string name="unpin_folder">No fijar carpeta</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Cambiar imagen de portada</string>
|
<string name="change_cover_image">Cambiar imagen de portada</string>
|
||||||
<string name="select_photo">Seleccionar imagen</string>
|
<string name="select_photo">Seleccionar imagen</string>
|
||||||
<string name="use_default">Uso por defecto</string>
|
<string name="use_default">Uso por defecto</string>
|
||||||
<string name="set_as">Establecer como</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brightness</string>
|
<string name="brightness">Brightness</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Ocultar automáticamente la interfaz de usuario del sistema en medios de pantalla completa</string>
|
<string name="hide_system_ui_at_fullscreen">Ocultar automáticamente la interfaz de usuario del sistema en medios de pantalla completa</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">Reemplazar Compartir con Girar en el menú de pantalla completa</string>
|
<string name="replace_share_with_rotate">Reemplazar Compartir con Girar en el menú de pantalla completa</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
149
app/src/main/res/values-fi/strings.xml
Normal file
149
app/src/main/res/values-fi/strings.xml
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="app_name">Simple Gallery</string>
|
||||||
|
<string name="app_launcher_name">Galleria</string>
|
||||||
|
<string name="edit">Muokkaa</string>
|
||||||
|
<string name="open_camera">Avaa kamera</string>
|
||||||
|
<string name="hidden">(piilotettu)</string>
|
||||||
|
<string name="pin_folder">Kiinnitä kansio</string>
|
||||||
|
<string name="unpin_folder">Poista kiinnitys</string>
|
||||||
|
<string name="show_all">Näytä kaikkien kansioiden sisältö</string>
|
||||||
|
<string name="all_folders">Kaikki kansiot</string>
|
||||||
|
<string name="folder_view">Vaihda kansionäkymään</string>
|
||||||
|
<string name="other_folder">Muu kansio</string>
|
||||||
|
<string name="show_on_map">Näytä kartalla</string>
|
||||||
|
<string name="unknown_location">Tuntematon sijainti</string>
|
||||||
|
<string name="no_map_application">Karttasovellusta ei löytynyt</string>
|
||||||
|
<string name="no_camera_app_found">Kamerasovellusta ei löytynyt</string>
|
||||||
|
<string name="increase_column_count">Increase column count</string>
|
||||||
|
<string name="reduce_column_count">Reduce column count</string>
|
||||||
|
<string name="change_cover_image">Vaihda kansikuva</string>
|
||||||
|
<string name="select_photo">Valitse kuva</string>
|
||||||
|
<string name="use_default">Käytä oletuksia</string>
|
||||||
|
<string name="volume">Äänenvoimakkuus</string>
|
||||||
|
<string name="brightness">Kirkkaus</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
|
<!-- Filter -->
|
||||||
|
<string name="filter_media">Suodata media</string>
|
||||||
|
<string name="images">Kuvat</string>
|
||||||
|
<string name="videos">Videot</string>
|
||||||
|
<string name="gifs">GIFit</string>
|
||||||
|
<string name="no_media_with_filters">Mediaa ei löytynyt valituilla suotimilla.</string>
|
||||||
|
<string name="change_filters_underlined"><u>Muuta suotimia</u></string>
|
||||||
|
|
||||||
|
<!-- Hide / Exclude -->
|
||||||
|
<string name="hide_folder_description">Tämä piilottaa kansion ja alikansiot lisäämällä \'.nomedia\' tiedoston kansioon. Näet ne valitsemalla \'Näytä piilotetut kansiot\' asetuksissa. Continue?</string>
|
||||||
|
<string name="exclude">Poissulje</string>
|
||||||
|
<string name="excluded_folders">Poissuljetut kansiot</string>
|
||||||
|
<string name="manage_excluded_folders">Hallitse poissuljettuja kansioita</string>
|
||||||
|
<string name="exclude_folder_description">Tämä poissulkee valitun ja alikansiot vain Simple Gallerysta. Voit hallinnoida poissuljettuja kansioita asetuksista.</string>
|
||||||
|
<string name="exclude_folder_parent">Poissulje yläkansio tämän sijaan?</string>
|
||||||
|
<string name="excluded_activity_placeholder">Kansion poissulkeminen piilottaa kansion alikansioineen vain Simple Galleryssa, ne jäävät näkyviin muihin sovelluksiin.\n\nJos haluat piilottaa kansion myös muissa sovelluksissa, käytä piilota-funktiota.</string>
|
||||||
|
<string name="remove_all">Poista kaikki</string>
|
||||||
|
<string name="remove_all_description">Poista kaikki kansiot poissuljettujen listasta? Tämä ei poista kansioita.</string>
|
||||||
|
|
||||||
|
<!-- Include folders -->
|
||||||
|
<string name="include_folders">Sisällytä kansiot</string>
|
||||||
|
<string name="manage_included_folders">Hallitse sisällettyjä kansioita</string>
|
||||||
|
<string name="add_folder">Lisää kansio</string>
|
||||||
|
<string name="included_activity_placeholder">Jos sinulla on kansioita, jotka sisältää mediaa, mutta sovellus ei tunnistanut, voit lisätä ne manuaalisesti tähän.\n\Lisääminen ei poissulje muita kansioita.</string>
|
||||||
|
|
||||||
|
<!-- Resizing -->
|
||||||
|
<string name="resize">Rajaa</string>
|
||||||
|
<string name="resize_and_save">Rajaa valinta ja tallenna</string>
|
||||||
|
<string name="width">Leveys</string>
|
||||||
|
<string name="height">Korkeus</string>
|
||||||
|
<string name="keep_aspect_ratio">Säilytä kuvasuhde</string>
|
||||||
|
<string name="invalid_values">Aseta oikea resoluutio.</string>
|
||||||
|
|
||||||
|
<!-- Editor -->
|
||||||
|
<string name="editor">Editori</string>
|
||||||
|
<string name="save">Tallenna</string>
|
||||||
|
<string name="rotate">Käännä</string>
|
||||||
|
<string name="path">Polku</string>
|
||||||
|
<string name="invalid_image_path">Kuvan polkua ei ole</string>
|
||||||
|
<string name="image_editing_failed">Kuvan muokkaus epäonnistui</string>
|
||||||
|
<string name="edit_image_with">Muokkaa kuvaa:</string>
|
||||||
|
<string name="no_editor_found">Kuvamuokkainta ei löytynyt</string>
|
||||||
|
<string name="unknown_file_location">Tuntematon tiedostosijainti</string>
|
||||||
|
<string name="error_saving_file">Lähdetiedoston ylikirjoitus epäonnistui</string>
|
||||||
|
<string name="rotate_left">Käännä vasemmalle</string>
|
||||||
|
<string name="rotate_right">Käännä oikealle</string>
|
||||||
|
<string name="rotate_one_eighty">Käännä 180º</string>
|
||||||
|
<string name="flip">Pyöräytä</string>
|
||||||
|
<string name="flip_horizontally">Pyöräytä vaakasuoraan</string>
|
||||||
|
<string name="flip_vertically">Pyöräytä pystysuoraan</string>
|
||||||
|
<string name="edit_with">Muokkaa sovelluksella</string>
|
||||||
|
|
||||||
|
<!-- Set wallpaper -->
|
||||||
|
<string name="simple_wallpaper">Simple Wallpaper</string>
|
||||||
|
<string name="set_as_wallpaper">Aseta taustakuvaksi</string>
|
||||||
|
<string name="set_as_wallpaper_failed">Taustakuvan asetus epäonnistui</string>
|
||||||
|
<string name="set_as_wallpaper_with">Aseta taustakuvaksi sovelluksella:</string>
|
||||||
|
<string name="no_capable_app_found">Toimivaa sovellusta ei löydetty</string>
|
||||||
|
<string name="setting_wallpaper">Asetetaan taustakuvaa…</string>
|
||||||
|
<string name="wallpaper_set_successfully">Taustakuva asetettu onnistuneesti</string>
|
||||||
|
<string name="portrait_aspect_ratio">Kuvasuhde pystyssä</string>
|
||||||
|
<string name="landscape_aspect_ratio">Kuvasuhde vaakatasossa</string>
|
||||||
|
|
||||||
|
<!-- Slideshow -->
|
||||||
|
<string name="slideshow">Diaesitys</string>
|
||||||
|
<string name="interval">Aikaväli (sekunteja):</string>
|
||||||
|
<string name="include_photos">Sisällytä Kuvat</string>
|
||||||
|
<string name="include_videos">Sisällytä Videot</string>
|
||||||
|
<string name="include_gifs">Sisällytä GIFit</string>
|
||||||
|
<string name="random_order">Satunnainen järjestys</string>
|
||||||
|
<string name="use_fade">Käytä häivitys-animaatiota</string>
|
||||||
|
<string name="move_backwards">Liiku takaisinpäin</string>
|
||||||
|
<string name="loop_slideshow">Jatkuva diaesitys</string>
|
||||||
|
<string name="slideshow_ended">Diaesitys päättyi</string>
|
||||||
|
<string name="no_media_for_slideshow">Mediaa diaesitykseen ei löytynyt</string>
|
||||||
|
|
||||||
|
<!-- View types -->
|
||||||
|
<string name="change_view_type">Vaihda näkymää</string>
|
||||||
|
<string name="grid">Ruudukko</string>
|
||||||
|
<string name="list">Lista</string>
|
||||||
|
|
||||||
|
<!-- Settings -->
|
||||||
|
<string name="show_hidden_media">Näytä piilotettu media</string>
|
||||||
|
<string name="autoplay_videos">Toista videot automaattisesti</string>
|
||||||
|
<string name="toggle_filename">Tiedostonimien näkyvyys</string>
|
||||||
|
<string name="loop_videos">Jatkuvat videot</string>
|
||||||
|
<string name="animate_gifs">Animoi GIFit pienoiskuvissa</string>
|
||||||
|
<string name="max_brightness">Täysi kirkkaus mediaa katsoessa</string>
|
||||||
|
<string name="crop_thumbnails">Leikkaa pienoiskuvat neliöiksi</string>
|
||||||
|
<string name="screen_rotation_by">Käännä koko ruudun mediaa</string>
|
||||||
|
<string name="screen_rotation_system_setting">Järjestelmän asetukset</string>
|
||||||
|
<string name="screen_rotation_device_rotation">Laitteen kierto</string>
|
||||||
|
<string name="screen_rotation_aspect_ratio">Kuvasuhde</string>
|
||||||
|
<string name="dark_background_at_fullscreen">Tumma tausta koko ruudun medioissa</string>
|
||||||
|
<string name="scroll_thumbnails_horizontally">Vieritä pienoiskuvia vaakasuorassa</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Piilota järjestelmän UI automaattisesti koko näytön mediassa</string>
|
||||||
|
<string name="delete_empty_folders">Poista tyhjät kansiot kansion tyhjennyksen jälkeen</string>
|
||||||
|
<string name="allow_video_gestures">Salli videon äänenvoimakkuuden ja kirkkauden säätö pystysuorilla eleillä</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
|
<string name="replace_share_with_rotate">Korvaa jakaminen kääntämisellä koko näytön tilassa</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
|
<!-- 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_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.
|
||||||
|
|
||||||
|
Galleriaa tarjotaan myös kolmansille osapuolille kuvien / videoiden tarkasteluun, liitteiden lisäämiseksi sähköpostiin yms. Täydellinen jokapäiväiseen käyttöön.
|
||||||
|
|
||||||
|
Ei sisällä mainoksia tai turhia käyttöoikeuksia. Täysin avointa lähdekoodia, tarjoaa muokattavat värit.
|
||||||
|
|
||||||
|
Tämä sovellus on vain yksi osa suurempaa kokoelmaa. Löydät loput osoitteesta http://www.simplemobiletools.com
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Haven't found some strings? There's more at
|
||||||
|
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
|
||||||
|
-->
|
||||||
|
</resources>
|
|
@ -4,10 +4,8 @@
|
||||||
<string name="app_launcher_name">Galerie</string>
|
<string name="app_launcher_name">Galerie</string>
|
||||||
<string name="edit">Édition</string>
|
<string name="edit">Édition</string>
|
||||||
<string name="open_camera">Ouvrir appareil photo</string>
|
<string name="open_camera">Ouvrir appareil photo</string>
|
||||||
<string name="open_with">Ouvrir avec</string>
|
|
||||||
<string name="no_app_found">Aucune application valide trouvée</string>
|
|
||||||
<string name="hidden">(caché)</string>
|
<string name="hidden">(caché)</string>
|
||||||
<string name="pin_folder">Épingler les dossiers</string>
|
<string name="pin_folder">Épingler le dossier</string>
|
||||||
<string name="unpin_folder">Désépingler le dossier</string>
|
<string name="unpin_folder">Désépingler le dossier</string>
|
||||||
<string name="show_all">Afficher le contenu de tous les dossiers</string>
|
<string name="show_all">Afficher le contenu de tous les dossiers</string>
|
||||||
<string name="all_folders">Tous les dossiers</string>
|
<string name="all_folders">Tous les dossiers</string>
|
||||||
|
@ -15,22 +13,24 @@
|
||||||
<string name="other_folder">Autre dossier</string>
|
<string name="other_folder">Autre dossier</string>
|
||||||
<string name="show_on_map">Afficher sur la carte</string>
|
<string name="show_on_map">Afficher sur la carte</string>
|
||||||
<string name="unknown_location">Position inconnue</string>
|
<string name="unknown_location">Position inconnue</string>
|
||||||
<string name="no_map_application">Aucune application de cartes n\'a été trouvée</string>
|
<string name="no_map_application">Aucune application de carte n\'a été trouvée</string>
|
||||||
<string name="no_camera_app_found">Aucune application d\\appareil photo n\'a été trouvée</string>
|
<string name="no_camera_app_found">Aucune application d\'appareil photo n\'a été trouvée</string>
|
||||||
<string name="increase_column_count">Augmenter le nombre de colonnes</string>
|
<string name="increase_column_count">Augmenter le nombre de colonnes</string>
|
||||||
<string name="reduce_column_count">Réduire le nombre de colonnes</string>
|
<string name="reduce_column_count">Réduire le nombre de colonnes</string>
|
||||||
<string name="change_cover_image">Change cover image</string>
|
<string name="change_cover_image">Changer l\'image de couverture</string>
|
||||||
<string name="select_photo">Sélectionner une photo</string>
|
<string name="select_photo">Sélectionner une photo</string>
|
||||||
<string name="use_default">Use default</string>
|
<string name="use_default">Utiliser par défaut</string>
|
||||||
<string name="set_as">Set as</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Luminosité</string>
|
<string name="brightness">Luminosité</string>
|
||||||
|
<string name="do_not_ask_again">Ne pas redemander pour cette session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrer medias</string>
|
<string name="filter_media">Filtrer les médias</string>
|
||||||
<string name="images">Images</string>
|
<string name="images">Images</string>
|
||||||
<string name="videos">Vidéos</string>
|
<string name="videos">Vidéos</string>
|
||||||
<string name="gifs">GIFs</string>
|
<string name="gifs">GIF</string>
|
||||||
<string name="no_media_with_filters">Aucun fichier média trouvé avec les filtres sélectionnés.</string>
|
<string name="no_media_with_filters">Aucun fichier média trouvé avec les filtres sélectionnés.</string>
|
||||||
<string name="change_filters_underlined"><u>Changer les filtres</u></string>
|
<string name="change_filters_underlined"><u>Changer les filtres</u></string>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<string name="include_folders">Dossiers inclus</string>
|
<string name="include_folders">Dossiers inclus</string>
|
||||||
<string name="manage_included_folders">Gérer les dossiers inclus</string>
|
<string name="manage_included_folders">Gérer les dossiers inclus</string>
|
||||||
<string name="add_folder">Ajouter un dossier</string>
|
<string name="add_folder">Ajouter un dossier</string>
|
||||||
<string name="included_activity_placeholder">Si vous avez des dossiers contenant du media et qui ne sont pas reconnus par l\'application alors, vous pouvez les ajouter manuellement ici.</string>
|
<string name="included_activity_placeholder">Si vous avez des dossiers contenant des médias et qui ne sont pas reconnus par l\'application alors, vous pouvez les ajouter manuellement ici.</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Redimensionner</string>
|
<string name="resize">Redimensionner</string>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<string name="width">Largeur</string>
|
<string name="width">Largeur</string>
|
||||||
<string name="height">Hauteur</string>
|
<string name="height">Hauteur</string>
|
||||||
<string name="keep_aspect_ratio">Garder le ratio</string>
|
<string name="keep_aspect_ratio">Garder le ratio</string>
|
||||||
<string name="invalid_values">Veuillez entrez une résolution valide</string>
|
<string name="invalid_values">Veuillez entrer une résolution valide</string>
|
||||||
|
|
||||||
<!-- Editor -->
|
<!-- Editor -->
|
||||||
<string name="editor">Éditeur</string>
|
<string name="editor">Éditeur</string>
|
||||||
|
@ -86,33 +86,33 @@
|
||||||
<string name="no_capable_app_found">Aucune application trouvée pour continuer cette action</string>
|
<string name="no_capable_app_found">Aucune application trouvée pour continuer cette action</string>
|
||||||
<string name="setting_wallpaper">Paramètres de fond d\'écran…</string>
|
<string name="setting_wallpaper">Paramètres de fond d\'écran…</string>
|
||||||
<string name="wallpaper_set_successfully">Fond d\'écran défini avec succès</string>
|
<string name="wallpaper_set_successfully">Fond d\'écran défini avec succès</string>
|
||||||
<string name="portrait_aspect_ratio">Ratio aspect Portrait</string>
|
<string name="portrait_aspect_ratio">Ratio d\'aspect portrait</string>
|
||||||
<string name="landscape_aspect_ratio">Ratio aspect Paysage</string>
|
<string name="landscape_aspect_ratio">Ratio d\'aspect paysage</string>
|
||||||
|
|
||||||
<!-- Slideshow -->
|
<!-- Slideshow -->
|
||||||
<string name="slideshow">Diaporama</string>
|
<string name="slideshow">Diaporama</string>
|
||||||
<string name="interval">Intervalle (secondes):</string>
|
<string name="interval">Intervalle (secondes) :</string>
|
||||||
<string name="include_photos">Inclure photos</string>
|
<string name="include_photos">Inclure photos</string>
|
||||||
<string name="include_videos">Inclure vidéos</string>
|
<string name="include_videos">Inclure vidéos</string>
|
||||||
<string name="include_gifs">Inclure GIFs</string>
|
<string name="include_gifs">Inclure GIF</string>
|
||||||
<string name="random_order">Ordre aléatoire</string>
|
<string name="random_order">Ordre aléatoire</string>
|
||||||
<string name="use_fade">Utiliser un fondu</string>
|
<string name="use_fade">Utiliser un fondu</string>
|
||||||
<string name="move_backwards">Revenir en arrière</string>
|
<string name="move_backwards">Revenir en arrière</string>
|
||||||
<string name="loop_slideshow">Loop slideshow</string>
|
<string name="loop_slideshow">Diaporama en boucle</string>
|
||||||
<string name="slideshow_ended">Diaporama terminé</string>
|
<string name="slideshow_ended">Diaporama terminé</string>
|
||||||
<string name="no_media_for_slideshow">Aucun média trouvé pour le diaporama</string>
|
<string name="no_media_for_slideshow">Aucun média trouvé pour le diaporama</string>
|
||||||
|
|
||||||
<!-- View types -->
|
<!-- View types -->
|
||||||
<string name="change_view_type">Change view type</string>
|
<string name="change_view_type">Changer le type de vue</string>
|
||||||
<string name="grid">Grid</string>
|
<string name="grid">Grille</string>
|
||||||
<string name="list">List</string>
|
<string name="list">Liste</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Afficher les dossiers cachés</string>
|
<string name="show_hidden_media">Afficher les dossiers cachés</string>
|
||||||
<string name="autoplay_videos">Lecture automatique des vidéos</string>
|
<string name="autoplay_videos">Lecture automatique des vidéos</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">Tourner en boucle les vidéos</string>
|
<string name="loop_videos">Lire en boucle les vidéos</string>
|
||||||
<string name="animate_gifs">GIFs animés sur les miniatures</string>
|
<string name="animate_gifs">GIF animés sur les miniatures</string>
|
||||||
<string name="max_brightness">Luminosité maximale lors de l\'affichage de media</string>
|
<string name="max_brightness">Luminosité maximale lors de l\'affichage de media</string>
|
||||||
<string name="crop_thumbnails">Rogner les miniatures en carrés</string>
|
<string name="crop_thumbnails">Rogner les miniatures en carrés</string>
|
||||||
<string name="screen_rotation_by">Pivoter les medias plein écran selon</string>
|
<string name="screen_rotation_by">Pivoter les medias plein écran selon</string>
|
||||||
|
@ -120,11 +120,14 @@
|
||||||
<string name="screen_rotation_device_rotation">Rotation de l\'appareil</string>
|
<string name="screen_rotation_device_rotation">Rotation de l\'appareil</string>
|
||||||
<string name="screen_rotation_aspect_ratio">Ratio d\'aspect</string>
|
<string name="screen_rotation_aspect_ratio">Ratio d\'aspect</string>
|
||||||
<string name="dark_background_at_fullscreen">Arrière-plan sombre pour média plein écran</string>
|
<string name="dark_background_at_fullscreen">Arrière-plan sombre pour média plein écran</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Défilement des mignatures horizontalement</string>
|
<string name="scroll_thumbnails_horizontally">Défilement des miniatures horizontalement</string>
|
||||||
<string name="hide_system_ui_at_fullscreen">Masquer automatiquement l\'interface utilisateur si média plein écran</string>
|
<string name="hide_system_ui_at_fullscreen">Masquer automatiquement l\'interface utilisateur si média plein écran</string>
|
||||||
<string name="delete_empty_folders">Supprimer les dossiers vides après avoir supprimé leur contenu</string>
|
<string name="delete_empty_folders">Supprimer les dossiers vides après avoir supprimé leur contenu</string>
|
||||||
<string name="allow_video_gestures">Permettre le contrôle du volume vidéo et de la luminosité avec des gestes verticaux</string>
|
<string name="allow_video_gestures">Permettre le contrôle du volume vidéo et de la luminosité avec des gestes verticaux</string>
|
||||||
|
<string name="show_media_count">Afficher le nombre de fichiers dans les dossiers sur l\'écran principal</string>
|
||||||
<string name="replace_share_with_rotate">Remplacer Partager par Pivoter si menu en plein écran</string>
|
<string name="replace_share_with_rotate">Remplacer Partager par Pivoter si menu en plein écran</string>
|
||||||
|
<string name="show_extended_details">Afficher les détails supplémentaires par dessus le média en plein écran</string>
|
||||||
|
<string name="manage_extended_details">Gérer les détails supplémentaires</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
@ -132,9 +135,9 @@
|
||||||
<string name="app_long_description">
|
<string name="app_long_description">
|
||||||
Un simple outil pour visionner les photos et les vidéos. Elles peuvent être triées par dates, tailles, noms dans les deux sens (alphabétique comme désalphabétique), il est possible de zoomer sur les photos. Les fichiers sont affichés sur de multiple colonnes en fonction de la taille 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 tournées, rognées ou être définies comme fond d\'écran directement depuis l\'application.
|
Un simple outil pour visionner les photos et les vidéos. Elles peuvent être triées par dates, tailles, noms dans les deux sens (alphabétique comme désalphabétique), il est possible de zoomer sur les photos. Les fichiers sont affichés sur de multiple colonnes en fonction de la taille 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 tournées, rognées ou être définies comme fond d\'écran directement depuis l\'application.
|
||||||
|
|
||||||
La galerie est aussi offerte pour l\'utiliser comme une tierce partie pour de la prévisualisation des images/vidéos, joindre aux clients mail etc. C\'est parfait pour un usage au quotidien.
|
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 email etc. C\'est parfait pour un usage au quotidien.
|
||||||
|
|
||||||
L\'application ne contient ni de publicité ni d\'autorisation inutile. Elle est totalement OpenSource et est aussi fournie avec un thème sombre.
|
L\'application ne contient ni publicité ni autorisation inutile. Elle est totalement opensource et est aussi fournie avec des couleurs personnalisables.
|
||||||
|
|
||||||
Cette application est juste l\'une des applications d\'une plus grande suite. Vous pouvez trouver les autres sur http://www.simplemobiletools.com
|
Cette application est juste l\'une des applications d\'une plus grande suite. Vous pouvez trouver les autres sur http://www.simplemobiletools.com
|
||||||
</string>
|
</string>
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Gallery</string>
|
<string name="app_launcher_name">Gallery</string>
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="open_camera">Open camera</string>
|
<string name="open_camera">Open camera</string>
|
||||||
<string name="open_with">Open with</string>
|
|
||||||
<string name="no_app_found">No valid app found</string>
|
|
||||||
<string name="hidden">(hidden)</string>
|
<string name="hidden">(hidden)</string>
|
||||||
<string name="pin_folder">Pin folder</string>
|
<string name="pin_folder">Pin folder</string>
|
||||||
<string name="unpin_folder">Unpin folder</string>
|
<string name="unpin_folder">Unpin folder</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Change cover image</string>
|
<string name="change_cover_image">Change cover image</string>
|
||||||
<string name="select_photo">Select photo</string>
|
<string name="select_photo">Select photo</string>
|
||||||
<string name="use_default">Use default</string>
|
<string name="use_default">Use default</string>
|
||||||
<string name="set_as">Set as</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brightness</string>
|
<string name="brightness">Brightness</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<string name="include_folders">Included folders</string>
|
<string name="include_folders">Included folders</string>
|
||||||
<string name="manage_included_folders">Manage included folders</string>
|
<string name="manage_included_folders">Manage included folders</string>
|
||||||
<string name="add_folder">Add folder</string>
|
<string name="add_folder">Add folder</string>
|
||||||
<string name="included_activity_placeholder">If you have some folders which contain media, but were not recognized by the app, you can add them manually here.</string>
|
<string name="included_activity_placeholder">If you have some folders which contain media, but were not recognized by the app, you can add them manually here.\n\nAdding some items here will not exclude any other folder.</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Resize</string>
|
<string name="resize">Resize</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galleria</string>
|
<string name="app_launcher_name">Galleria</string>
|
||||||
<string name="edit">Modifica</string>
|
<string name="edit">Modifica</string>
|
||||||
<string name="open_camera">Apri fotocamera</string>
|
<string name="open_camera">Apri fotocamera</string>
|
||||||
<string name="open_with">Apri con</string>
|
|
||||||
<string name="no_app_found">Nessun app valida trovata</string>
|
|
||||||
<string name="hidden">(nascosta)</string>
|
<string name="hidden">(nascosta)</string>
|
||||||
<string name="pin_folder">Blocca cartella</string>
|
<string name="pin_folder">Blocca cartella</string>
|
||||||
<string name="unpin_folder">Sblocca cartella</string>
|
<string name="unpin_folder">Sblocca cartella</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Cambia immagine copertina</string>
|
<string name="change_cover_image">Cambia immagine copertina</string>
|
||||||
<string name="select_photo">Seleziona foto</string>
|
<string name="select_photo">Seleziona foto</string>
|
||||||
<string name="use_default">Usa predefinita</string>
|
<string name="use_default">Usa predefinita</string>
|
||||||
<string name="set_as">Imposta come</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Luminosità</string>
|
<string name="brightness">Luminosità</string>
|
||||||
|
<string name="do_not_ask_again">Non chiedere nuovamente in questa sessione</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtra i media</string>
|
<string name="filter_media">Filtra i media</string>
|
||||||
|
@ -103,9 +103,9 @@
|
||||||
<string name="no_media_for_slideshow">Nessun media trovato per la presentazione</string>
|
<string name="no_media_for_slideshow">Nessun media trovato per la presentazione</string>
|
||||||
|
|
||||||
<!-- View types -->
|
<!-- View types -->
|
||||||
<string name="change_view_type">Change view type</string>
|
<string name="change_view_type">Cambia modalità visualizzazione</string>
|
||||||
<string name="grid">Grid</string>
|
<string name="grid">Griglia</string>
|
||||||
<string name="list">List</string>
|
<string name="list">Elenco</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Mostra cartelle nascoste</string>
|
<string name="show_hidden_media">Mostra cartelle nascoste</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Nascondi UI di sistema con media a schermo intero</string>
|
<string name="hide_system_ui_at_fullscreen">Nascondi UI di sistema con media a schermo intero</string>
|
||||||
<string name="delete_empty_folders">Elimina cartelle vuote dopo averne eliminato il contenuto</string>
|
<string name="delete_empty_folders">Elimina cartelle vuote dopo averne eliminato il contenuto</string>
|
||||||
<string name="allow_video_gestures">Gestisci il volume e la luminosità dei video con gesti verticali</string>
|
<string name="allow_video_gestures">Gestisci il volume e la luminosità dei video con gesti verticali</string>
|
||||||
|
<string name="show_media_count">Mostra numero elementi nella cartella</string>
|
||||||
<string name="replace_share_with_rotate">Sostituisci Condividi con Ruota a schermo intero</string>
|
<string name="replace_share_with_rotate">Sostituisci Condividi con Ruota a schermo intero</string>
|
||||||
|
<string name="show_extended_details">Mostra informazioni estese su media a schermo intero</string>
|
||||||
|
<string name="manage_extended_details">Gestisci le informazioni estese</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">ギャラリー</string>
|
<string name="app_launcher_name">ギャラリー</string>
|
||||||
<string name="edit">編集</string>
|
<string name="edit">編集</string>
|
||||||
<string name="open_camera">カメラを開く</string>
|
<string name="open_camera">カメラを開く</string>
|
||||||
<string name="open_with">別のアプリで開く</string>
|
|
||||||
<string name="no_app_found">有効なアプリが見つかりません</string>
|
|
||||||
<string name="hidden">(非表示)</string>
|
<string name="hidden">(非表示)</string>
|
||||||
<string name="pin_folder">フォルダーをピン留めする</string>
|
<string name="pin_folder">フォルダーをピン留めする</string>
|
||||||
<string name="unpin_folder">フォルダーのピン留めを外す</string>
|
<string name="unpin_folder">フォルダーのピン留めを外す</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">カバー画像を変更</string>
|
<string name="change_cover_image">カバー画像を変更</string>
|
||||||
<string name="select_photo">写真を選択</string>
|
<string name="select_photo">写真を選択</string>
|
||||||
<string name="use_default">デフォルトに戻す</string>
|
<string name="use_default">デフォルトに戻す</string>
|
||||||
<string name="set_as">他で使う</string>
|
|
||||||
<string name="volume">音量</string>
|
<string name="volume">音量</string>
|
||||||
<string name="brightness">明るさ</string>
|
<string name="brightness">明るさ</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">表示メディア種</string>
|
<string name="filter_media">表示メディア種</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">フルスクリーン時にシステムUIを非表示にする</string>
|
<string name="hide_system_ui_at_fullscreen">フルスクリーン時にシステムUIを非表示にする</string>
|
||||||
<string name="delete_empty_folders">メディアの削除後にフォルダーが空になった場合、そのフォルダーを削除する</string>
|
<string name="delete_empty_folders">メディアの削除後にフォルダーが空になった場合、そのフォルダーを削除する</string>
|
||||||
<string name="allow_video_gestures">ビデオ再生中に、音量と明るさを縦方向のジェスチャーで変更する</string>
|
<string name="allow_video_gestures">ビデオ再生中に、音量と明るさを縦方向のジェスチャーで変更する</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">フルスクリーンメニューの「共有」を「回転」に置き換える</string>
|
<string name="replace_share_with_rotate">フルスクリーンメニューの「共有」を「回転」に置き換える</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
149
app/src/main/res/values-ms/strings.xml
Normal file
149
app/src/main/res/values-ms/strings.xml
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="app_name">Simple Gallery</string>
|
||||||
|
<string name="app_launcher_name">Gallery</string>
|
||||||
|
<string name="edit">Edit</string>
|
||||||
|
<string name="open_camera">Open camera</string>
|
||||||
|
<string name="hidden">(hidden)</string>
|
||||||
|
<string name="pin_folder">Pin folder</string>
|
||||||
|
<string name="unpin_folder">Unpin folder</string>
|
||||||
|
<string name="show_all">Show all folders content</string>
|
||||||
|
<string name="all_folders">All folders</string>
|
||||||
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="other_folder">Other folder</string>
|
||||||
|
<string name="show_on_map">Show on map</string>
|
||||||
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
<string name="no_camera_app_found">No Camera app has been found</string>
|
||||||
|
<string name="increase_column_count">Increase column count</string>
|
||||||
|
<string name="reduce_column_count">Reduce column count</string>
|
||||||
|
<string name="change_cover_image">Change cover image</string>
|
||||||
|
<string name="select_photo">Select photo</string>
|
||||||
|
<string name="use_default">Use default</string>
|
||||||
|
<string name="volume">Volume</string>
|
||||||
|
<string name="brightness">Brightness</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
|
<!-- Filter -->
|
||||||
|
<string name="filter_media">Filter media</string>
|
||||||
|
<string name="images">Images</string>
|
||||||
|
<string name="videos">Videos</string>
|
||||||
|
<string name="gifs">GIFs</string>
|
||||||
|
<string name="no_media_with_filters">No media files have been found with the selected filters.</string>
|
||||||
|
<string name="change_filters_underlined"><u>Change filters</u></string>
|
||||||
|
|
||||||
|
<!-- Hide / Exclude -->
|
||||||
|
<string name="hide_folder_description">This function hides the folder by adding a \'.nomedia\' file into it, it will hide all subfolders too. You can see them by toggling the \'Show hidden folders\' option in Settings. Continue?</string>
|
||||||
|
<string name="exclude">Exclude</string>
|
||||||
|
<string name="excluded_folders">Excluded folders</string>
|
||||||
|
<string name="manage_excluded_folders">Manage excluded folders</string>
|
||||||
|
<string name="exclude_folder_description">This will exclude the selection together with its subfolders from Simple Gallery only. You can manage excluded folders in Settings.</string>
|
||||||
|
<string name="exclude_folder_parent">Exclude a parent instead?</string>
|
||||||
|
<string name="excluded_activity_placeholder">Excluding folders will make them together with their subfolders hidden just in Simple Gallery, they will still be visible in other applications.\n\nIf you want to hide them from other apps too, use the Hide function.</string>
|
||||||
|
<string name="remove_all">Remove all</string>
|
||||||
|
<string name="remove_all_description">Remove all folders from the list of excluded? This will not delete the folders.</string>
|
||||||
|
|
||||||
|
<!-- Include folders -->
|
||||||
|
<string name="include_folders">Included folders</string>
|
||||||
|
<string name="manage_included_folders">Manage included folders</string>
|
||||||
|
<string name="add_folder">Add folder</string>
|
||||||
|
<string name="included_activity_placeholder">If you have some folders which contain media, but were not recognized by the app, you can add them manually here.\n\nAdding some items here will not exclude any other folder.</string>
|
||||||
|
|
||||||
|
<!-- Resizing -->
|
||||||
|
<string name="resize">Resize</string>
|
||||||
|
<string name="resize_and_save">Resize selection and save</string>
|
||||||
|
<string name="width">Width</string>
|
||||||
|
<string name="height">Height</string>
|
||||||
|
<string name="keep_aspect_ratio">Keep aspect ratio</string>
|
||||||
|
<string name="invalid_values">Please enter a valid resolution</string>
|
||||||
|
|
||||||
|
<!-- Editor -->
|
||||||
|
<string name="editor">Editor</string>
|
||||||
|
<string name="save">Save</string>
|
||||||
|
<string name="rotate">Rotate</string>
|
||||||
|
<string name="path">Path</string>
|
||||||
|
<string name="invalid_image_path">Invalid image path</string>
|
||||||
|
<string name="image_editing_failed">Image editing failed</string>
|
||||||
|
<string name="edit_image_with">Edit image with:</string>
|
||||||
|
<string name="no_editor_found">No image editor found</string>
|
||||||
|
<string name="unknown_file_location">Unknown file location</string>
|
||||||
|
<string name="error_saving_file">Could not overwrite the source file</string>
|
||||||
|
<string name="rotate_left">Rotate left</string>
|
||||||
|
<string name="rotate_right">Rotate right</string>
|
||||||
|
<string name="rotate_one_eighty">Rotate by 180º</string>
|
||||||
|
<string name="flip">Flip</string>
|
||||||
|
<string name="flip_horizontally">Flip horizontally</string>
|
||||||
|
<string name="flip_vertically">Flip vertically</string>
|
||||||
|
<string name="edit_with">Edit with</string>
|
||||||
|
|
||||||
|
<!-- Set wallpaper -->
|
||||||
|
<string name="simple_wallpaper">Simple Wallpaper</string>
|
||||||
|
<string name="set_as_wallpaper">Set as Wallpaper</string>
|
||||||
|
<string name="set_as_wallpaper_failed">Setting as Wallpaper failed</string>
|
||||||
|
<string name="set_as_wallpaper_with">Set as wallpaper with:</string>
|
||||||
|
<string name="no_capable_app_found">No app capable of it has been found</string>
|
||||||
|
<string name="setting_wallpaper">Setting wallpaper…</string>
|
||||||
|
<string name="wallpaper_set_successfully">Wallpaper set successfully</string>
|
||||||
|
<string name="portrait_aspect_ratio">Portrait aspect ratio</string>
|
||||||
|
<string name="landscape_aspect_ratio">Landscape aspect ratio</string>
|
||||||
|
|
||||||
|
<!-- Slideshow -->
|
||||||
|
<string name="slideshow">Slideshow</string>
|
||||||
|
<string name="interval">Interval (seconds):</string>
|
||||||
|
<string name="include_photos">Include photos</string>
|
||||||
|
<string name="include_videos">Include videos</string>
|
||||||
|
<string name="include_gifs">Include GIFs</string>
|
||||||
|
<string name="random_order">Random order</string>
|
||||||
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
<string name="loop_slideshow">Loop slideshow</string>
|
||||||
|
<string name="slideshow_ended">The slideshow ended</string>
|
||||||
|
<string name="no_media_for_slideshow">No media for the slideshow have been found</string>
|
||||||
|
|
||||||
|
<!-- View types -->
|
||||||
|
<string name="change_view_type">Change view type</string>
|
||||||
|
<string name="grid">Grid</string>
|
||||||
|
<string name="list">List</string>
|
||||||
|
|
||||||
|
<!-- Settings -->
|
||||||
|
<string name="show_hidden_media">Show hidden media</string>
|
||||||
|
<string name="autoplay_videos">Play videos automatically</string>
|
||||||
|
<string name="toggle_filename">Toggle filename visibility</string>
|
||||||
|
<string name="loop_videos">Loop videos</string>
|
||||||
|
<string name="animate_gifs">Animate GIFs at thumbnails</string>
|
||||||
|
<string name="max_brightness">Max brightness when viewing media</string>
|
||||||
|
<string name="crop_thumbnails">Crop thumbnails into squares</string>
|
||||||
|
<string name="screen_rotation_by">Rotate fullscreen media by</string>
|
||||||
|
<string name="screen_rotation_system_setting">System setting</string>
|
||||||
|
<string name="screen_rotation_device_rotation">Device rotation</string>
|
||||||
|
<string name="screen_rotation_aspect_ratio">Aspect ratio</string>
|
||||||
|
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||||
|
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
|
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||||
|
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
|
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
|
<!-- 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_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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Contains no ads or unnecessary permissions. It is fully opensource, provides customizable colors.
|
||||||
|
|
||||||
|
This app is just one piece of a bigger series of apps. You can find the rest of them at http://www.simplemobiletools.com
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Haven't found some strings? There's more at
|
||||||
|
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
|
||||||
|
-->
|
||||||
|
</resources>
|
149
app/src/main/res/values-nl/strings.xml
Normal file
149
app/src/main/res/values-nl/strings.xml
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="app_name">Eenvoudige Galerij</string>
|
||||||
|
<string name="app_launcher_name">Galerij</string>
|
||||||
|
<string name="edit">Bewerken</string>
|
||||||
|
<string name="open_camera">Camera</string>
|
||||||
|
<string name="hidden">(verborgen)</string>
|
||||||
|
<string name="pin_folder">Map vastzetten</string>
|
||||||
|
<string name="unpin_folder">Map losmaken</string>
|
||||||
|
<string name="show_all">Platte weergave</string>
|
||||||
|
<string name="all_folders">Alle mappen</string>
|
||||||
|
<string name="folder_view">Mapweergave</string>
|
||||||
|
<string name="other_folder">Andere map</string>
|
||||||
|
<string name="show_on_map">Op kaart tonen</string>
|
||||||
|
<string name="unknown_location">Locatie onbekend</string>
|
||||||
|
<string name="no_map_application">Geen app voor kaarten gevonden</string>
|
||||||
|
<string name="no_camera_app_found">Geen app voor camera gevonden</string>
|
||||||
|
<string name="increase_column_count">Meer kolommen</string>
|
||||||
|
<string name="reduce_column_count">Minder kolommen</string>
|
||||||
|
<string name="change_cover_image">Afbeelding voor omslag veranderen</string>
|
||||||
|
<string name="select_photo">Foto selecteren</string>
|
||||||
|
<string name="use_default">Standaard gebruiken</string>
|
||||||
|
<string name="volume">Volume</string>
|
||||||
|
<string name="brightness">Helderheid</string>
|
||||||
|
<string name="do_not_ask_again">Onthouden voor deze sessie</string>
|
||||||
|
<string name="lock_orientation">Schermrotatie vergrendelen</string>
|
||||||
|
<string name="unlock_orientation">Schermrotatie ontgrendelen</string>
|
||||||
|
|
||||||
|
<!-- Filter -->
|
||||||
|
<string name="filter_media">Media kiezen</string>
|
||||||
|
<string name="images">Afbeeldingen</string>
|
||||||
|
<string name="videos">Video\'s</string>
|
||||||
|
<string name="gifs">GIF-bestanden</string>
|
||||||
|
<string name="no_media_with_filters">Geen bestanden gevonden met de huidige filters.</string>
|
||||||
|
<string name="change_filters_underlined"><u>Media kiezen</u></string>
|
||||||
|
|
||||||
|
<!-- Hide / Exclude -->
|
||||||
|
<string name="hide_folder_description">Deze functie verbergt de map door het bestand \'.nomedia\' toe te voegen. Alle submappen zullen ook worden verborgen. Kies \'Verborgen mappen tonen\' in de instellingen om toch verborgen mappen te kunnen inzien. Doorgaan?</string>
|
||||||
|
<string name="exclude">Uitsluiten</string>
|
||||||
|
<string name="excluded_folders">Uitgesloten mappen</string>
|
||||||
|
<string name="manage_excluded_folders">Uitgesloten mappen beheren</string>
|
||||||
|
<string name="exclude_folder_description">De selectie en submappen uitsluiten van deze galerij. Uitgesloten mappen kunnen worden beheerd in de instellingen.</string>
|
||||||
|
<string name="exclude_folder_parent">Map die dit item bevat uitsluiten?</string>
|
||||||
|
<string name="excluded_activity_placeholder">Uitsluiten zal mappen en hun submappen verbergen voor deze galerij, maar niet voor andere apps.\n\nAls u de mappen ook in andere apps wilt verbergen, kies dan voor de functie Verbergen.</string>
|
||||||
|
<string name="remove_all">Alles verwijderen</string>
|
||||||
|
<string name="remove_all_description">Verwijder alles uit de lijst van uitgesloten mappen? Dit zal de mappen zelf niet verwijderen.</string>
|
||||||
|
|
||||||
|
<!-- Include folders -->
|
||||||
|
<string name="include_folders">Ingesloten mappen</string>
|
||||||
|
<string name="manage_included_folders">Ingesloten mappen beheren</string>
|
||||||
|
<string name="add_folder">Map toevoegen</string>
|
||||||
|
<string name="included_activity_placeholder">Als er mappen zijn die wel media bevatten, maar niet niet door de galerij worden herkend, voeg deze mappen dan hier handmatig toe.\n\nHet hier toevoegen van mappen zal andere mappen niet uitsluiten.</string>
|
||||||
|
|
||||||
|
<!-- Resizing -->
|
||||||
|
<string name="resize">Grootte aanpassen</string>
|
||||||
|
<string name="resize_and_save">Grootte aanpassen en opslaan</string>
|
||||||
|
<string name="width">Breedte</string>
|
||||||
|
<string name="height">Hoogte</string>
|
||||||
|
<string name="keep_aspect_ratio">Verhouding vergrendelen</string>
|
||||||
|
<string name="invalid_values">Voer geldige afmetingen in</string>
|
||||||
|
|
||||||
|
<!-- Editor -->
|
||||||
|
<string name="editor">Bewerken</string>
|
||||||
|
<string name="save">Opslaan</string>
|
||||||
|
<string name="rotate">Draaien</string>
|
||||||
|
<string name="path">Pad</string>
|
||||||
|
<string name="invalid_image_path">Ongeldig pad naar afbeelding</string>
|
||||||
|
<string name="image_editing_failed">Fout bij bewerken van afbeelding</string>
|
||||||
|
<string name="edit_image_with">Afbeelding bewerken met:</string>
|
||||||
|
<string name="no_editor_found">Geen app gevonden voor bewerking</string>
|
||||||
|
<string name="unknown_file_location">Onbekende bestandslocatie</string>
|
||||||
|
<string name="error_saving_file">Kan het bronbestand niet overschrijven</string>
|
||||||
|
<string name="rotate_left">Linksom draaien</string>
|
||||||
|
<string name="rotate_right">Rechtsom draaien</string>
|
||||||
|
<string name="rotate_one_eighty">180º draaien</string>
|
||||||
|
<string name="flip">Kantelen</string>
|
||||||
|
<string name="flip_horizontally">Horizontaal kantelen</string>
|
||||||
|
<string name="flip_vertically">Verticaal kantelen</string>
|
||||||
|
<string name="edit_with">Bewerken met</string>
|
||||||
|
|
||||||
|
<!-- Set wallpaper -->
|
||||||
|
<string name="simple_wallpaper">Achtergrond</string>
|
||||||
|
<string name="set_as_wallpaper">Als achtergrond instellen</string>
|
||||||
|
<string name="set_as_wallpaper_failed">Achtergrond instellen mislukt</string>
|
||||||
|
<string name="set_as_wallpaper_with">Achtergrond instellen met:</string>
|
||||||
|
<string name="no_capable_app_found">Geen app gevonden voor instellen achtergrond</string>
|
||||||
|
<string name="setting_wallpaper">Achtergrond instellen…</string>
|
||||||
|
<string name="wallpaper_set_successfully">Achtergrond is ingesteld</string>
|
||||||
|
<string name="portrait_aspect_ratio">Verhouding in portretmodus</string>
|
||||||
|
<string name="landscape_aspect_ratio">Verhouding in landschapsmodus</string>
|
||||||
|
|
||||||
|
<!-- Slideshow -->
|
||||||
|
<string name="slideshow">Diavoorstelling</string>
|
||||||
|
<string name="interval">Interval (seconden):</string>
|
||||||
|
<string name="include_photos">Afbeeldingen weergeven</string>
|
||||||
|
<string name="include_videos">Video\'s weergeven</string>
|
||||||
|
<string name="include_gifs">GIF-bestanden weergeven</string>
|
||||||
|
<string name="random_order">Willekeurige volgorde</string>
|
||||||
|
<string name="use_fade">Animaties gebruiken (vervagen)</string>
|
||||||
|
<string name="move_backwards">Omgekeerde volgorde</string>
|
||||||
|
<string name="loop_slideshow">Voorstelling herhalen</string>
|
||||||
|
<string name="slideshow_ended">De diavoorstelling is beëindigd</string>
|
||||||
|
<string name="no_media_for_slideshow">Geen media gevonden voor diavoorstelling</string>
|
||||||
|
|
||||||
|
<!-- View types -->
|
||||||
|
<string name="change_view_type">Weergave</string>
|
||||||
|
<string name="grid">Rooster</string>
|
||||||
|
<string name="list">Lijst</string>
|
||||||
|
|
||||||
|
<!-- Settings -->
|
||||||
|
<string name="show_hidden_media">Verborgen mappen tonen</string>
|
||||||
|
<string name="autoplay_videos">Video\'s automatisch afspelen</string>
|
||||||
|
<string name="toggle_filename">Bestandsnamen tonen</string>
|
||||||
|
<string name="loop_videos">Video\'s herhalen</string>
|
||||||
|
<string name="animate_gifs">GIF-bestanden afspelen in overzicht</string>
|
||||||
|
<string name="max_brightness">Maximale helderheid in volledige weergave</string>
|
||||||
|
<string name="crop_thumbnails">Voorbeelden vierkant bijsnijden</string>
|
||||||
|
<string name="screen_rotation_by">Media in volledige weergave roteren volgens</string>
|
||||||
|
<string name="screen_rotation_system_setting">Systeeminstelling</string>
|
||||||
|
<string name="screen_rotation_device_rotation">Rotatie van apparaat</string>
|
||||||
|
<string name="screen_rotation_aspect_ratio">Afmetingen van bestand</string>
|
||||||
|
<string name="dark_background_at_fullscreen">Donkere achtergrond bij volledige weergave</string>
|
||||||
|
<string name="scroll_thumbnails_horizontally">Horizontaal scrollen</string>
|
||||||
|
<string name="hide_system_ui_at_fullscreen">Automatisch de statusbalk verbergen in volledige weergave</string>
|
||||||
|
<string name="delete_empty_folders">Lege mappen verwijderen na het verwijderen van hun inhoud</string>
|
||||||
|
<string name="allow_video_gestures">Volume en helderheid aanpassen met verticale sleepgebaren</string>
|
||||||
|
<string name="show_media_count">Aantallen in mappen tonen</string>
|
||||||
|
<string name="replace_share_with_rotate">Menu-item Draaien vastzetten in volledige weergave (in plaats van Delen)</string>
|
||||||
|
<string name="show_extended_details">Uitgebreide informatie tonen in volledige weergave</string>
|
||||||
|
<string name="manage_extended_details">Uitgebreide informatie</string>
|
||||||
|
|
||||||
|
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||||
|
<!-- Short description has to have less than 80 chars -->
|
||||||
|
<string name="app_short_description">Een galerij voor afbeeldingen en video\'s, zonder advertenties.</string>
|
||||||
|
<string name="app_long_description">
|
||||||
|
Een eenvoudige galerij voor afbeeldingen en video\'s. Bestanden kunnen worden gesorteerd op datum, grootte en naam. Afbeeldingen kunnen in- en uitgezoomd worden. Bestanden worden afhankelijk van de schermgrootte weergegeven in kolommen, waarbij het aantal kolommen kan worden aangepast via knijpgebaren. Bestanden kunnen worden gedeeld, hernoemd, gekopieerd, verplaatst en verwijderd. Afbeeldingen kunnen ook worden bijgesneden, gedraaid, gekanteld of direct vanuit de app als achtergrond worden ingesteld.
|
||||||
|
|
||||||
|
De galerij kan ook worden gebruikt voor het bekijken van afbeeldingen of video\'s vanuit andere apps, om bijlagen toe te voegen in e-mail, etc. Perfect voor dagelijks gebruik.
|
||||||
|
|
||||||
|
Bevat geen advertenties of onnodige permissies. Volledig open-source. Kleuren van de app kunnen worden aangepast.
|
||||||
|
|
||||||
|
Deze app is onderdeel van een grotere verzameling. Vind de andere apps op http://www.simplemobiletools.com
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Haven't found some strings? There's more at
|
||||||
|
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
|
||||||
|
-->
|
||||||
|
</resources>
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Simple Gallery</string>
|
<string name="app_launcher_name">Simple Gallery</string>
|
||||||
<string name="edit">Edytuj</string>
|
<string name="edit">Edytuj</string>
|
||||||
<string name="open_camera">Uruchom aplikację aparatu</string>
|
<string name="open_camera">Uruchom aplikację aparatu</string>
|
||||||
<string name="open_with">Otwórz w</string>
|
|
||||||
<string name="no_app_found">Nie znaleziono danych aplikacji</string>
|
|
||||||
<string name="hidden">(ukryty)</string>
|
<string name="hidden">(ukryty)</string>
|
||||||
<string name="pin_folder">Przypnij folder</string>
|
<string name="pin_folder">Przypnij folder</string>
|
||||||
<string name="unpin_folder">Wypakuj folder</string>
|
<string name="unpin_folder">Wypakuj folder</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Zmień okładkę</string>
|
<string name="change_cover_image">Zmień okładkę</string>
|
||||||
<string name="select_photo">Wybierz obraz</string>
|
<string name="select_photo">Wybierz obraz</string>
|
||||||
<string name="use_default">Użyj domyślnej</string>
|
<string name="use_default">Użyj domyślnej</string>
|
||||||
<string name="set_as">Ustaw jako</string>
|
|
||||||
<string name="volume">Głośność</string>
|
<string name="volume">Głośność</string>
|
||||||
<string name="brightness">Jasność</string>
|
<string name="brightness">Jasność</string>
|
||||||
|
<string name="do_not_ask_again">Nie pytaj więcej w tej sesji</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtruj multimedia</string>
|
<string name="filter_media">Filtruj multimedia</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Ukrywaj interfejs przy pełnoekranowym podglądzie</string>
|
<string name="hide_system_ui_at_fullscreen">Ukrywaj interfejs przy pełnoekranowym podglądzie</string>
|
||||||
<string name="delete_empty_folders">Usuwaj puste foldery po usunięciu ich zawartości</string>
|
<string name="delete_empty_folders">Usuwaj puste foldery po usunięciu ich zawartości</string>
|
||||||
<string name="allow_video_gestures">Zezwalaj na kontrolę jasności i głośności filmów pionowymi gestami</string>
|
<string name="allow_video_gestures">Zezwalaj na kontrolę jasności i głośności filmów pionowymi gestami</string>
|
||||||
|
<string name="show_media_count">Pokazuj liczbę elementów w folderach w głównym widoku</string>
|
||||||
<string name="replace_share_with_rotate">Zamień funkcję udostępniania na obracanie w menu pełnoekranowym</string>
|
<string name="replace_share_with_rotate">Zamień funkcję udostępniania na obracanie w menu pełnoekranowym</string>
|
||||||
|
<string name="show_extended_details">Dodatkowe szczegóły przy podglądzie pełnoekranowym</string>
|
||||||
|
<string name="manage_extended_details">Zarządzaj dodatkowymi szczegółami</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galeria</string>
|
<string name="app_launcher_name">Galeria</string>
|
||||||
<string name="edit">Editar</string>
|
<string name="edit">Editar</string>
|
||||||
<string name="open_camera">Abrir câmera</string>
|
<string name="open_camera">Abrir câmera</string>
|
||||||
<string name="open_with">Abrir com</string>
|
|
||||||
<string name="no_app_found">Nenhum aplicativo encontrado</string>
|
|
||||||
<string name="hidden">(oculto)</string>
|
<string name="hidden">(oculto)</string>
|
||||||
<string name="pin_folder">Fixar pasta</string>
|
<string name="pin_folder">Fixar pasta</string>
|
||||||
<string name="unpin_folder">Desfixar pasta</string>
|
<string name="unpin_folder">Desfixar pasta</string>
|
||||||
|
@ -22,17 +20,19 @@
|
||||||
<string name="change_cover_image">Trocar imagem de capa</string>
|
<string name="change_cover_image">Trocar imagem de capa</string>
|
||||||
<string name="select_photo">Selecionar foto</string>
|
<string name="select_photo">Selecionar foto</string>
|
||||||
<string name="use_default">Usar padrão</string>
|
<string name="use_default">Usar padrão</string>
|
||||||
<string name="set_as">Set as</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brightness</string>
|
<string name="brightness">Brilho</string>
|
||||||
|
<string name="do_not_ask_again">Não perguntar novamente por enquanto</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filtrar mídia</string>
|
||||||
<string name="images">Images</string>
|
<string name="images">Imagens</string>
|
||||||
<string name="videos">Videos</string>
|
<string name="videos">Vídeos</string>
|
||||||
<string name="gifs">GIFs</string>
|
<string name="gifs">GIFs</string>
|
||||||
<string name="no_media_with_filters">No media files have been found with the selected filters.</string>
|
<string name="no_media_with_filters">Nenhum arquivo de mídia encontrado a partir dos filtros selecionados.</string>
|
||||||
<string name="change_filters_underlined"><u>Change filters</u></string>
|
<string name="change_filters_underlined"><u>Mudar filtros</u></string>
|
||||||
|
|
||||||
<!-- Hide / Exclude -->
|
<!-- Hide / Exclude -->
|
||||||
<string name="hide_folder_description">Esta opção oculta uma pasta com a adição de um arquivo \'.nomedia\' dentro dela, e irá ocultar todas as subpastas que estejam dentro da mesma. Você poderá rever essas pastas com a opção \'Mostrar pastas ocultas\'. Continuar?</string>
|
<string name="hide_folder_description">Esta opção oculta uma pasta com a adição de um arquivo \'.nomedia\' dentro dela, e irá ocultar todas as subpastas que estejam dentro da mesma. Você poderá rever essas pastas com a opção \'Mostrar pastas ocultas\'. Continuar?</string>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<string name="flip">Inverter</string>
|
<string name="flip">Inverter</string>
|
||||||
<string name="flip_horizontally">Horizontalmente</string>
|
<string name="flip_horizontally">Horizontalmente</string>
|
||||||
<string name="flip_vertically">Verticalmente</string>
|
<string name="flip_vertically">Verticalmente</string>
|
||||||
<string name="edit_with">Edit with</string>
|
<string name="edit_with">Editar com</string>
|
||||||
|
|
||||||
<!-- Set wallpaper -->
|
<!-- Set wallpaper -->
|
||||||
<string name="simple_wallpaper">Simple Wallpaper</string>
|
<string name="simple_wallpaper">Simple Wallpaper</string>
|
||||||
|
@ -91,21 +91,21 @@
|
||||||
|
|
||||||
<!-- Slideshow -->
|
<!-- Slideshow -->
|
||||||
<string name="slideshow">Slideshow</string>
|
<string name="slideshow">Slideshow</string>
|
||||||
<string name="interval">Interval (seconds):</string>
|
<string name="interval">Intervalo (segundos):</string>
|
||||||
<string name="include_photos">Include photos</string>
|
<string name="include_photos">Incluir fotos</string>
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Incluir videos</string>
|
||||||
<string name="include_gifs">Include GIFs</string>
|
<string name="include_gifs">Incluir GIFs</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Ordem aleatória</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Usar animação de esmaecimento</string>
|
||||||
<string name="move_backwards">Move backwards</string>
|
<string name="move_backwards">Retroceder</string>
|
||||||
<string name="loop_slideshow">Loop slideshow</string>
|
<string name="loop_slideshow">Apresentação em ciclo</string>
|
||||||
<string name="slideshow_ended">The slideshow ended</string>
|
<string name="slideshow_ended">Fim da apresentação</string>
|
||||||
<string name="no_media_for_slideshow">No media for the slideshow have been found</string>
|
<string name="no_media_for_slideshow">Nenhuma mídia encontrada para a apresentação</string>
|
||||||
|
|
||||||
<!-- View types -->
|
<!-- View types -->
|
||||||
<string name="change_view_type">Change view type</string>
|
<string name="change_view_type">Alterar modo de visualização</string>
|
||||||
<string name="grid">Grid</string>
|
<string name="grid">Grade</string>
|
||||||
<string name="list">List</string>
|
<string name="list">Lista</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
||||||
|
@ -121,10 +121,13 @@
|
||||||
<string name="screen_rotation_aspect_ratio">Proporção da mídia</string>
|
<string name="screen_rotation_aspect_ratio">Proporção da mídia</string>
|
||||||
<string name="dark_background_at_fullscreen">Fundo de tela escuro em mídia tela cheia</string>
|
<string name="dark_background_at_fullscreen">Fundo de tela escuro em mídia tela cheia</string>
|
||||||
<string name="scroll_thumbnails_horizontally">Rolar miniaturas horizontalmente</string>
|
<string name="scroll_thumbnails_horizontally">Rolar miniaturas horizontalmente</string>
|
||||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
<string name="hide_system_ui_at_fullscreen">Esconder interface do sistema automaticamente quando em tela cheia</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">Apagar pastas vazias após deleter seu conteúdo</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">Permitir controle do volume e brilho com gestos na vertical</string>
|
||||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
<string name="show_media_count">Mostrar quantidade de arquivos das pastas</string>
|
||||||
|
<string name="replace_share_with_rotate">Substituir botão "Compartilhar" por "Rotação de tela" quando em tela cheia</string>
|
||||||
|
<string name="show_extended_details">Exibir detalhes extendidos quando em tela cheia</string>
|
||||||
|
<string name="manage_extended_details">Gerenciar detalhes extendidos</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galeria</string>
|
<string name="app_launcher_name">Galeria</string>
|
||||||
<string name="edit">Editar</string>
|
<string name="edit">Editar</string>
|
||||||
<string name="open_camera">Abrir câmara</string>
|
<string name="open_camera">Abrir câmara</string>
|
||||||
<string name="open_with">Abrir com</string>
|
|
||||||
<string name="no_app_found">Nenhuma aplicação encontrada</string>
|
|
||||||
<string name="hidden">(oculta)</string>
|
<string name="hidden">(oculta)</string>
|
||||||
<string name="pin_folder">Fixar pasta</string>
|
<string name="pin_folder">Fixar pasta</string>
|
||||||
<string name="unpin_folder">Desafixar pasta</string>
|
<string name="unpin_folder">Desafixar pasta</string>
|
||||||
|
@ -19,12 +17,14 @@
|
||||||
<string name="no_camera_app_found">Não existe uma aplicação adequeada</string>
|
<string name="no_camera_app_found">Não existe uma aplicação adequeada</string>
|
||||||
<string name="increase_column_count">Aumentar número de colunas</string>
|
<string name="increase_column_count">Aumentar número de colunas</string>
|
||||||
<string name="reduce_column_count">Diminuir número de colunas</string>
|
<string name="reduce_column_count">Diminuir número de colunas</string>
|
||||||
<string name="change_cover_image">Alterar imagem da capa</string>
|
<string name="change_cover_image">Alterar imagem de capa</string>
|
||||||
<string name="select_photo">Selecionar foto</string>
|
<string name="select_photo">Selecionar foto</string>
|
||||||
<string name="use_default">Predefinição</string>
|
<string name="use_default">Predefinição</string>
|
||||||
<string name="set_as">Definir como</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brilho</string>
|
<string name="brightness">Brilho</string>
|
||||||
|
<string name="do_not_ask_again">Não perguntar de novo para esta sessão</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrar multimédia</string>
|
<string name="filter_media">Filtrar multimédia</string>
|
||||||
|
@ -103,9 +103,9 @@
|
||||||
<string name="no_media_for_slideshow">Não foram encontrados ficheiros para a apresentação</string>
|
<string name="no_media_for_slideshow">Não foram encontrados ficheiros para a apresentação</string>
|
||||||
|
|
||||||
<!-- View types -->
|
<!-- View types -->
|
||||||
<string name="change_view_type">Change view type</string>
|
<string name="change_view_type">Tipo de exibição</string>
|
||||||
<string name="grid">Grid</string>
|
<string name="grid">Grelha</string>
|
||||||
<string name="list">List</string>
|
<string name="list">Lista</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Ocultar interface do sistema se em ecrã completo</string>
|
<string name="hide_system_ui_at_fullscreen">Ocultar interface do sistema se em ecrã completo</string>
|
||||||
<string name="delete_empty_folders">Apagar as pastas vazias depois de remover o seu conteúdo</string>
|
<string name="delete_empty_folders">Apagar as pastas vazias depois de remover o seu conteúdo</string>
|
||||||
<string name="allow_video_gestures">Permitir controlo do volume e brilho dos vídeos através de gestos verticais</string>
|
<string name="allow_video_gestures">Permitir controlo do volume e brilho dos vídeos através de gestos verticais</string>
|
||||||
|
<string name="show_media_count">Mostrar número de ficheiros na vista principal</string>
|
||||||
<string name="replace_share_with_rotate">Substituir a opção Partilhar pela opção Rodar se em ecrã completo</string>
|
<string name="replace_share_with_rotate">Substituir a opção Partilhar pela opção Rodar se em ecrã completo</string>
|
||||||
|
<string name="show_extended_details">Mostrar detalhes se em ecrã completo</string>
|
||||||
|
<string name="manage_extended_details">Gerir detalhes exibidos</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Галерея</string>
|
<string name="app_launcher_name">Галерея</string>
|
||||||
<string name="edit">Редактировать</string>
|
<string name="edit">Редактировать</string>
|
||||||
<string name="open_camera">Открыть камеру</string>
|
<string name="open_camera">Открыть камеру</string>
|
||||||
<string name="open_with">Открыть в</string>
|
|
||||||
<string name="no_app_found">Приложение не найдено</string>
|
|
||||||
<string name="hidden">(Скрытый)</string>
|
<string name="hidden">(Скрытый)</string>
|
||||||
<string name="pin_folder">Закрепить папку</string>
|
<string name="pin_folder">Закрепить папку</string>
|
||||||
<string name="unpin_folder">Открепить папку</string>
|
<string name="unpin_folder">Открепить папку</string>
|
||||||
|
@ -17,14 +15,16 @@
|
||||||
<string name="unknown_location">Место съёмки не указано</string>
|
<string name="unknown_location">Место съёмки не указано</string>
|
||||||
<string name="no_map_application">Не найдено приложений с картами</string>
|
<string name="no_map_application">Не найдено приложений с картами</string>
|
||||||
<string name="no_camera_app_found">Не найдено приложения камеры</string>
|
<string name="no_camera_app_found">Не найдено приложения камеры</string>
|
||||||
<string name="increase_column_count">Добавить 1 столбец</string>
|
<string name="increase_column_count">Добавить столбец</string>
|
||||||
<string name="reduce_column_count">Убрать 1 столбец</string>
|
<string name="reduce_column_count">Убрать столбец</string>
|
||||||
<string name="change_cover_image">Изменить обложку</string>
|
<string name="change_cover_image">Изменить обложку</string>
|
||||||
<string name="select_photo">Выбрать изображение</string>
|
<string name="select_photo">Выбрать изображение</string>
|
||||||
<string name="use_default">Использовать по умолчанию</string>
|
<string name="use_default">Использовать по умолчанию</string>
|
||||||
<string name="set_as">Установить как...</string>
|
|
||||||
<string name="volume">Громкость</string>
|
<string name="volume">Громкость</string>
|
||||||
<string name="brightness">Яркость</string>
|
<string name="brightness">Яркость</string>
|
||||||
|
<string name="do_not_ask_again">Не спрашивать снова (до следующего запуска)</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Фильтр медиа</string>
|
<string name="filter_media">Фильтр медиа</string>
|
||||||
|
@ -84,10 +84,10 @@
|
||||||
<string name="set_as_wallpaper_failed">Установить не удалось</string>
|
<string name="set_as_wallpaper_failed">Установить не удалось</string>
|
||||||
<string name="set_as_wallpaper_with">Установить в качестве обоев в:</string>
|
<string name="set_as_wallpaper_with">Установить в качестве обоев в:</string>
|
||||||
<string name="no_capable_app_found">Приложение не найдено</string>
|
<string name="no_capable_app_found">Приложение не найдено</string>
|
||||||
<string name="setting_wallpaper">Установка обоев…</string>
|
<string name="setting_wallpaper">Установка обоев…</string>
|
||||||
<string name="wallpaper_set_successfully">Обои успешно установлены</string>
|
<string name="wallpaper_set_successfully">Обои успешно установлены</string>
|
||||||
<string name="portrait_aspect_ratio">Формат изображения</string>
|
<string name="portrait_aspect_ratio">Портрет</string>
|
||||||
<string name="landscape_aspect_ratio">Пейзажное соотношение сторон</string>
|
<string name="landscape_aspect_ratio">Ландшафт</string>
|
||||||
|
|
||||||
<!-- Slideshow -->
|
<!-- Slideshow -->
|
||||||
<string name="slideshow">Слайдшоу</string>
|
<string name="slideshow">Слайдшоу</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Автоматически скрывать системный интерфейс в полноэкранном режиме</string>
|
<string name="hide_system_ui_at_fullscreen">Автоматически скрывать системный интерфейс в полноэкранном режиме</string>
|
||||||
<string name="delete_empty_folders">Удалять пустые папки после удаления их содержимого</string>
|
<string name="delete_empty_folders">Удалять пустые папки после удаления их содержимого</string>
|
||||||
<string name="allow_video_gestures">Управлять громкостью и яркостью видео с помощью вертикальных жестов</string>
|
<string name="allow_video_gestures">Управлять громкостью и яркостью видео с помощью вертикальных жестов</string>
|
||||||
|
<string name="show_media_count">Показывать количество файлов в папках</string>
|
||||||
<string name="replace_share_with_rotate">Заменить \'Поделиться\' на \'Повернуть\' в меню полноэкранного режима</string>
|
<string name="replace_share_with_rotate">Заменить \'Поделиться\' на \'Повернуть\' в меню полноэкранного режима</string>
|
||||||
|
<string name="show_extended_details">Показывать детали файла</string>
|
||||||
|
<string name="manage_extended_details">Выбрать детали файла</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galéria</string>
|
<string name="app_launcher_name">Galéria</string>
|
||||||
<string name="edit">Upraviť</string>
|
<string name="edit">Upraviť</string>
|
||||||
<string name="open_camera">Otvoriť fotoaparát</string>
|
<string name="open_camera">Otvoriť fotoaparát</string>
|
||||||
<string name="open_with">Otvoriť pomocou</string>
|
|
||||||
<string name="no_app_found">Nenašla sa žiadna vhodná aplikácia</string>
|
|
||||||
<string name="hidden">(skryté)</string>
|
<string name="hidden">(skryté)</string>
|
||||||
<string name="pin_folder">Pripnúť priečinok</string>
|
<string name="pin_folder">Pripnúť priečinok</string>
|
||||||
<string name="unpin_folder">Odopnúť priečinok</string>
|
<string name="unpin_folder">Odopnúť priečinok</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Zmeniť obal albumu</string>
|
<string name="change_cover_image">Zmeniť obal albumu</string>
|
||||||
<string name="select_photo">Zvoliť foto</string>
|
<string name="select_photo">Zvoliť foto</string>
|
||||||
<string name="use_default">Použiť predvolený</string>
|
<string name="use_default">Použiť predvolený</string>
|
||||||
<string name="set_as">Nastaviť ako</string>
|
|
||||||
<string name="volume">Hlasitosť</string>
|
<string name="volume">Hlasitosť</string>
|
||||||
<string name="brightness">Jas</string>
|
<string name="brightness">Jas</string>
|
||||||
|
<string name="do_not_ask_again">Nepýtať sa už v tomto spustení</string>
|
||||||
|
<string name="lock_orientation">Uzamknúť otočenie obrazovky</string>
|
||||||
|
<string name="unlock_orientation">Odomknúť otočenie obrazovky</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter médií</string>
|
<string name="filter_media">Filter médií</string>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<string name="include_folders">Pridané priečinky</string>
|
<string name="include_folders">Pridané priečinky</string>
|
||||||
<string name="manage_included_folders">Spravovať pridané priečinky</string>
|
<string name="manage_included_folders">Spravovať pridané priečinky</string>
|
||||||
<string name="add_folder">Pridať priečinok</string>
|
<string name="add_folder">Pridať priečinok</string>
|
||||||
<string name="included_activity_placeholder">Ak máte nejaké priečinky obsahujúce médiá, ale neboli rozpoznané aplikáciou, môžete ich tu manuálne pridať.</string>
|
<string name="included_activity_placeholder">Ak máte nejaké priečinky obsahujúce médiá, ale neboli rozpoznané aplikáciou, môžete ich tu manuálne pridať.\n\nPridanie nových položiek sem nevylúči žiadny iný priečinok.</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Zmeniť veľkosť</string>
|
<string name="resize">Zmeniť veľkosť</string>
|
||||||
|
@ -124,13 +124,16 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Automaticky skrývať systémové lišty pri celoobrazovkových médiách</string>
|
<string name="hide_system_ui_at_fullscreen">Automaticky skrývať systémové lišty pri celoobrazovkových médiách</string>
|
||||||
<string name="delete_empty_folders">Odstrániť prázdne priečinky po vymazaní ich obsahu</string>
|
<string name="delete_empty_folders">Odstrániť prázdne priečinky po vymazaní ich obsahu</string>
|
||||||
<string name="allow_video_gestures">Povoliť ovládanie hlasitosti a jasu videí vertikálnymi ťahmi</string>
|
<string name="allow_video_gestures">Povoliť ovládanie hlasitosti a jasu videí vertikálnymi ťahmi</string>
|
||||||
|
<string name="show_media_count">Zobraziť počet médií v priečinku na hlavnej obrazovke</string>
|
||||||
<string name="replace_share_with_rotate">Nahradiť Zdieľanie s Otočením v celoobrazovkovom menu</string>
|
<string name="replace_share_with_rotate">Nahradiť Zdieľanie s Otočením v celoobrazovkovom menu</string>
|
||||||
|
<string name="show_extended_details">Zobraziť rozšírené vlastnosti ponad celoobrazovkové médiá</string>
|
||||||
|
<string name="manage_extended_details">Spravovať rozšírené vlastnosti</string>
|
||||||
|
|
||||||
<!-- 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">Galéria na prezeranie obrázkov a videí bez reklám.</string>
|
<string name="app_short_description">Galéria na prezeranie obrázkov a videí bez reklám.</string>
|
||||||
<string name="app_long_description">
|
<string name="app_long_description">
|
||||||
Jednoduchá nástroj použiteľný na prezeranie obrázkov a videí. Položky môžu byť zoradené podľa dátumu, veľkosti, názvu oboma smermi, obrázky je možné aj priblížiť. Položky sú zobrazované vo viacerých stĺpcoch v závislosti od veľkosti displeja, počet stĺpcov je možné meniť pomocou gesta prstami. Súbory môžete premenovať, zdieľať, mazať, kopírovať, premiestňovaŤ. Obrázky môžete orezať, otočiť, alebo nastaviť ako tapeta priamo v aplikácií.
|
Jednoduchá nástroj použiteľný na prezeranie obrázkov a videí. Položky môžu byť zoradené podľa dátumu, veľkosti, názvu oboma smermi, obrázky je možné aj priblížiť. Položky sú zobrazované vo viacerých stĺpcoch v závislosti od veľkosti displeja, počet stĺpcov je možné meniť pomocou gesta prstami. Súbory môžete premenovať, zdieľať, mazať, kopírovať, premiestňovať. Obrázky môžete orezať, otočiť, alebo nastaviť ako tapeta priamo v aplikácií.
|
||||||
|
|
||||||
Galéria je tiež poskytovaná pre použitie treťou stranou pre prehliadanie fotiek a videí, pridávanie príloh v emailových klientoch. Je perfektná na každodenné použitie.
|
Galéria je tiež poskytovaná pre použitie treťou stranou pre prehliadanie fotiek a videí, pridávanie príloh v emailových klientoch. Je perfektná na každodenné použitie.
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galleri</string>
|
<string name="app_launcher_name">Galleri</string>
|
||||||
<string name="edit">Redigera</string>
|
<string name="edit">Redigera</string>
|
||||||
<string name="open_camera">Starta kameran</string>
|
<string name="open_camera">Starta kameran</string>
|
||||||
<string name="open_with">Öppna med</string>
|
|
||||||
<string name="no_app_found">Hittade ingen giltig app</string>
|
|
||||||
<string name="hidden">(dold)</string>
|
<string name="hidden">(dold)</string>
|
||||||
<string name="pin_folder">Fäst mappen</string>
|
<string name="pin_folder">Fäst mappen</string>
|
||||||
<string name="unpin_folder">Släpp mappen</string>
|
<string name="unpin_folder">Släpp mappen</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Byt omslagsbild</string>
|
<string name="change_cover_image">Byt omslagsbild</string>
|
||||||
<string name="select_photo">Välj foto</string>
|
<string name="select_photo">Välj foto</string>
|
||||||
<string name="use_default">Använd standard</string>
|
<string name="use_default">Använd standard</string>
|
||||||
<string name="set_as">Ange som</string>
|
|
||||||
<string name="volume">Volym</string>
|
<string name="volume">Volym</string>
|
||||||
<string name="brightness">Ljusstyrka</string>
|
<string name="brightness">Ljusstyrka</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrera media</string>
|
<string name="filter_media">Filtrera media</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Dölj systemanvändargränssnittet automatiskt när media visas i helskärmsläge</string>
|
<string name="hide_system_ui_at_fullscreen">Dölj systemanvändargränssnittet automatiskt när media visas i helskärmsläge</string>
|
||||||
<string name="delete_empty_folders">Ta bort tomma mappar när deras innehåll tas bort</string>
|
<string name="delete_empty_folders">Ta bort tomma mappar när deras innehåll tas bort</string>
|
||||||
<string name="allow_video_gestures">Tillåt styrning av videovolym och videoljusstyrka med vertikala gester</string>
|
<string name="allow_video_gestures">Tillåt styrning av videovolym och videoljusstyrka med vertikala gester</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">Ersätt Dela med Rotera i helskärmsmenyn</string>
|
<string name="replace_share_with_rotate">Ersätt Dela med Rotera i helskärmsmenyn</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Galeri</string>
|
<string name="app_launcher_name">Galeri</string>
|
||||||
<string name="edit">Düzenle</string>
|
<string name="edit">Düzenle</string>
|
||||||
<string name="open_camera">Kamerayı aç</string>
|
<string name="open_camera">Kamerayı aç</string>
|
||||||
<string name="open_with">Bununla aç</string>
|
|
||||||
<string name="no_app_found">Geçerli bir uygulama bulunamadı</string>
|
|
||||||
<string name="hidden">(gizli)</string>
|
<string name="hidden">(gizli)</string>
|
||||||
<string name="pin_folder">Pin klasör</string>
|
<string name="pin_folder">Pin klasör</string>
|
||||||
<string name="unpin_folder">Klasörü çöz</string>
|
<string name="unpin_folder">Klasörü çöz</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Change cover image</string>
|
<string name="change_cover_image">Change cover image</string>
|
||||||
<string name="select_photo">Select photo</string>
|
<string name="select_photo">Select photo</string>
|
||||||
<string name="use_default">Use default</string>
|
<string name="use_default">Use default</string>
|
||||||
<string name="set_as">Set as</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brightness</string>
|
<string name="brightness">Brightness</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Simple Gallery</string>
|
<string name="app_name">简约图库</string>
|
||||||
<string name="app_launcher_name">简约图库</string>
|
<string name="app_launcher_name">简约图库</string>
|
||||||
<string name="edit">编辑</string>
|
<string name="edit">编辑</string>
|
||||||
<string name="open_camera">打开相机</string>
|
<string name="open_camera">打开相机</string>
|
||||||
<string name="open_with">打开方式</string>
|
|
||||||
<string name="no_app_found">未找到可用应用</string>
|
|
||||||
<string name="hidden">(隐藏)</string>
|
<string name="hidden">(隐藏)</string>
|
||||||
<string name="pin_folder">锁定目录</string>
|
<string name="pin_folder">锁定目录</string>
|
||||||
<string name="unpin_folder">解除锁定目录</string>
|
<string name="unpin_folder">解除锁定目录</string>
|
||||||
|
@ -22,28 +20,30 @@
|
||||||
<string name="change_cover_image">更改封面图片</string>
|
<string name="change_cover_image">更改封面图片</string>
|
||||||
<string name="select_photo">选择图片</string>
|
<string name="select_photo">选择图片</string>
|
||||||
<string name="use_default">使用默认</string>
|
<string name="use_default">使用默认</string>
|
||||||
<string name="set_as">设置为</string>
|
|
||||||
<string name="volume">音量</string>
|
<string name="volume">音量</string>
|
||||||
<string name="brightness">亮度</string>
|
<string name="brightness">亮度</string>
|
||||||
|
<string name="do_not_ask_again">不再提醒</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">要显示的媒体文件</string>
|
||||||
<string name="images">Images</string>
|
<string name="images">图片</string>
|
||||||
<string name="videos">Videos</string>
|
<string name="videos">视频</string>
|
||||||
<string name="gifs">GIFs</string>
|
<string name="gifs">GIFs</string>
|
||||||
<string name="no_media_with_filters">No media files have been found with the selected filters.</string>
|
<string name="no_media_with_filters">所选的过滤器没有找到媒体文件。</string>
|
||||||
<string name="change_filters_underlined"><u>Change filters</u></string>
|
<string name="change_filters_underlined"><u>更改过滤器</u></string>
|
||||||
|
|
||||||
<!-- Hide / Exclude -->
|
<!-- Hide / Exclude -->
|
||||||
<string name="hide_folder_description">通过添加文件 \'.nomedia\' 到目录,可以防止目录及其子目录下的所有媒体被扫描。您可以通过设置中的 \'显示隐藏目录\' 选项改变设置,是否继续?</string>
|
<string name="hide_folder_description">通过添加文件 \'.nomedia\' 到目录,可以防止目录及其子目录下的所有媒体被扫描。您可以通过设置中的 \'显示隐藏目录\' 选项改变设置,是否继续?</string>
|
||||||
<string name="exclude">排除</string>
|
<string name="exclude">排除</string>
|
||||||
<string name="excluded_folders">排除目录</string>
|
<string name="excluded_folders">排除目录</string>
|
||||||
<string name="manage_excluded_folders">管理排除目录</string>
|
<string name="manage_excluded_folders">管理排除目录</string>
|
||||||
<string name="exclude_folder_description">目录及其子目录中的媒体将不会在 Simple Gallery 中显示,您可以在设置更改。</string>
|
<string name="exclude_folder_description">目录及其子目录中的媒体将不会在“简约图库”中显示,您可以在设置更改。</string>
|
||||||
<string name="exclude_folder_parent">是否排除父目录?</string>
|
<string name="exclude_folder_parent">是否排除父目录?</string>
|
||||||
<string name="excluded_activity_placeholder">此目录及其子目录中的媒体将不会在 Simple Gallery 中显示,但是其它应用可以访问。如果您想对其它应用隐藏,请使用隐藏功能。</string>
|
<string name="excluded_activity_placeholder">此目录及其子目录中的媒体将不会在“简约图库”中显示,但是其它应用可以访问。如果您想对其它应用隐藏,请使用隐藏功能。</string>
|
||||||
<string name="remove_all">移除全部</string>
|
<string name="remove_all">移除全部</string>
|
||||||
<string name="remove_all_description">是否移除列表中的全部目录?目录不会被物理删除。</string>
|
<string name="remove_all_description">是否删除排除列表中的所有项目?此操作不会删除文件夹本身。</string>
|
||||||
|
|
||||||
<!-- Include folders -->
|
<!-- Include folders -->
|
||||||
<string name="include_folders">包含目录</string>
|
<string name="include_folders">包含目录</string>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<string name="edit_with">编辑方式</string>
|
<string name="edit_with">编辑方式</string>
|
||||||
|
|
||||||
<!-- Set wallpaper -->
|
<!-- Set wallpaper -->
|
||||||
<string name="simple_wallpaper">Simple Wallpaper</string>
|
<string name="simple_wallpaper">简约壁纸</string>
|
||||||
<string name="set_as_wallpaper">设为壁纸</string>
|
<string name="set_as_wallpaper">设为壁纸</string>
|
||||||
<string name="set_as_wallpaper_failed">壁纸设置失败</string>
|
<string name="set_as_wallpaper_failed">壁纸设置失败</string>
|
||||||
<string name="set_as_wallpaper_with">设为壁纸...</string>
|
<string name="set_as_wallpaper_with">设为壁纸...</string>
|
||||||
|
@ -92,20 +92,20 @@
|
||||||
<!-- Slideshow -->
|
<!-- Slideshow -->
|
||||||
<string name="slideshow">幻灯片</string>
|
<string name="slideshow">幻灯片</string>
|
||||||
<string name="interval">间隔(秒):</string>
|
<string name="interval">间隔(秒):</string>
|
||||||
<string name="include_photos">Include photos</string>
|
<string name="include_photos">包括照片</string>
|
||||||
<string name="include_videos">包含视频</string>
|
<string name="include_videos">包括视频</string>
|
||||||
<string name="include_gifs">Include GIFs</string>
|
<string name="include_gifs">包括 GIFs</string>
|
||||||
<string name="random_order">随机顺序</string>
|
<string name="random_order">随机顺序</string>
|
||||||
<string name="use_fade">使用渐变动画</string>
|
<string name="use_fade">使用渐变动画</string>
|
||||||
<string name="move_backwards">倒播</string>
|
<string name="move_backwards">倒播</string>
|
||||||
<string name="loop_slideshow">Loop slideshow</string>
|
<string name="loop_slideshow">循环幻灯片</string>
|
||||||
<string name="slideshow_ended">幻灯片结束</string>
|
<string name="slideshow_ended">幻灯片结束</string>
|
||||||
<string name="no_media_for_slideshow">未发现可用媒体</string>
|
<string name="no_media_for_slideshow">未发现可用媒体</string>
|
||||||
|
|
||||||
<!-- View types -->
|
<!-- View types -->
|
||||||
<string name="change_view_type">Change view type</string>
|
<string name="change_view_type">更改视图类型</string>
|
||||||
<string name="grid">Grid</string>
|
<string name="grid">网格</string>
|
||||||
<string name="list">List</string>
|
<string name="list">列表</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">显示所有</string>
|
<string name="show_hidden_media">显示所有</string>
|
||||||
|
@ -115,16 +115,19 @@
|
||||||
<string name="animate_gifs">GIF 缩略图</string>
|
<string name="animate_gifs">GIF 缩略图</string>
|
||||||
<string name="max_brightness">浏览时最大亮度</string>
|
<string name="max_brightness">浏览时最大亮度</string>
|
||||||
<string name="crop_thumbnails">裁剪缩略图</string>
|
<string name="crop_thumbnails">裁剪缩略图</string>
|
||||||
<string name="screen_rotation_by">全屏时方向</string>
|
<string name="screen_rotation_by">全屏方向</string>
|
||||||
<string name="screen_rotation_system_setting">系统设置</string>
|
<string name="screen_rotation_system_setting">系统设置</string>
|
||||||
<string name="screen_rotation_device_rotation">设备方向</string>
|
<string name="screen_rotation_device_rotation">设备方向</string>
|
||||||
<string name="screen_rotation_aspect_ratio">根据长宽比</string>
|
<string name="screen_rotation_aspect_ratio">根据长宽比</string>
|
||||||
<string name="dark_background_at_fullscreen">全屏时黑色背景</string>
|
<string name="dark_background_at_fullscreen">全屏时黑色背景</string>
|
||||||
<string name="scroll_thumbnails_horizontally">水平滚动缩略图</string>
|
<string name="scroll_thumbnails_horizontally">水平滚动缩略图</string>
|
||||||
<string name="hide_system_ui_at_fullscreen">全屏时自动隐藏状态栏</string>
|
<string name="hide_system_ui_at_fullscreen">全屏时自动隐藏状态栏</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">删除没有内容的空文件夹</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">使用纵向滑动手势控制视频音量和亮度</string>
|
||||||
|
<string name="show_media_count">在主界面显示文件夹媒体计数</string>
|
||||||
<string name="replace_share_with_rotate">替换全屏时菜单栏的“分享”为“旋转”</string>
|
<string name="replace_share_with_rotate">替换全屏时菜单栏的“分享”为“旋转”</string>
|
||||||
|
<string name="show_extended_details">全屏浏览媒体时显示详细信息</string>
|
||||||
|
<string name="manage_extended_details">要显示的详细信息项目</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">簡易相簿</string>
|
<string name="app_launcher_name">簡易相簿</string>
|
||||||
<string name="edit">編輯</string>
|
<string name="edit">編輯</string>
|
||||||
<string name="open_camera">開啟相機</string>
|
<string name="open_camera">開啟相機</string>
|
||||||
<string name="open_with">以其他應用程式開啟</string>
|
|
||||||
<string name="no_app_found">找不到應用程式</string>
|
|
||||||
<string name="hidden">(隱藏)</string>
|
<string name="hidden">(隱藏)</string>
|
||||||
<string name="pin_folder">釘選資料夾</string>
|
<string name="pin_folder">釘選資料夾</string>
|
||||||
<string name="unpin_folder">取消釘選資料夾</string>
|
<string name="unpin_folder">取消釘選資料夾</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">更換封面圖片</string>
|
<string name="change_cover_image">更換封面圖片</string>
|
||||||
<string name="select_photo">選擇相片</string>
|
<string name="select_photo">選擇相片</string>
|
||||||
<string name="use_default">使用預設</string>
|
<string name="use_default">使用預設</string>
|
||||||
<string name="set_as">設為</string>
|
|
||||||
<string name="volume">音量</string>
|
<string name="volume">音量</string>
|
||||||
<string name="brightness">亮度</string>
|
<string name="brightness">亮度</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">篩選媒體檔案</string>
|
<string name="filter_media">篩選媒體檔案</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">全螢幕時自動隱藏系統介面</string>
|
<string name="hide_system_ui_at_fullscreen">全螢幕時自動隱藏系統介面</string>
|
||||||
<string name="delete_empty_folders">刪除內容後刪除空白資料夾</string>
|
<string name="delete_empty_folders">刪除內容後刪除空白資料夾</string>
|
||||||
<string name="allow_video_gestures">允許用上下手勢來控制影片的音量和亮度</string>
|
<string name="allow_video_gestures">允許用上下手勢來控制影片的音量和亮度</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">將全螢幕選單的分享取代為旋轉</string>
|
<string name="replace_share_with_rotate">將全螢幕選單的分享取代為旋轉</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -7,4 +7,6 @@
|
||||||
<!-- Default colors -->
|
<!-- Default colors -->
|
||||||
<color name="default_text_color">@color/default_dark_theme_text_color</color>
|
<color name="default_text_color">@color/default_dark_theme_text_color</color>
|
||||||
<color name="default_background_color">@color/default_dark_theme_background_color</color>
|
<color name="default_background_color">@color/default_dark_theme_background_color</color>
|
||||||
|
|
||||||
|
<color name="ic_launcher_background">@color/color_primary</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Release notes -->
|
<!-- Release notes -->
|
||||||
|
<string name="release_138">Added an option to keep last-modified field at file copy/move/rename</string>
|
||||||
|
<string name="release_137">Added an option to hide folder media count on the main screen</string>
|
||||||
|
<string name="release_136">Added an option to show customizable extended details over fullscreen media</string>
|
||||||
<string name="release_133">
|
<string name="release_133">
|
||||||
Added fingerprint to hidden item protection\n
|
Added fingerprint to hidden item protection\n
|
||||||
Added a new List view type
|
Added a new List view type
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<string name="app_launcher_name">Gallery</string>
|
<string name="app_launcher_name">Gallery</string>
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="open_camera">Open camera</string>
|
<string name="open_camera">Open camera</string>
|
||||||
<string name="open_with">Open with</string>
|
|
||||||
<string name="no_app_found">No valid app found</string>
|
|
||||||
<string name="hidden">(hidden)</string>
|
<string name="hidden">(hidden)</string>
|
||||||
<string name="pin_folder">Pin folder</string>
|
<string name="pin_folder">Pin folder</string>
|
||||||
<string name="unpin_folder">Unpin folder</string>
|
<string name="unpin_folder">Unpin folder</string>
|
||||||
|
@ -22,9 +20,11 @@
|
||||||
<string name="change_cover_image">Change cover image</string>
|
<string name="change_cover_image">Change cover image</string>
|
||||||
<string name="select_photo">Select photo</string>
|
<string name="select_photo">Select photo</string>
|
||||||
<string name="use_default">Use default</string>
|
<string name="use_default">Use default</string>
|
||||||
<string name="set_as">Set as</string>
|
|
||||||
<string name="volume">Volume</string>
|
<string name="volume">Volume</string>
|
||||||
<string name="brightness">Brightness</string>
|
<string name="brightness">Brightness</string>
|
||||||
|
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||||
|
<string name="lock_orientation">Lock orientation</string>
|
||||||
|
<string name="unlock_orientation">Unlock orientation</string>
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<string name="include_folders">Included folders</string>
|
<string name="include_folders">Included folders</string>
|
||||||
<string name="manage_included_folders">Manage included folders</string>
|
<string name="manage_included_folders">Manage included folders</string>
|
||||||
<string name="add_folder">Add folder</string>
|
<string name="add_folder">Add folder</string>
|
||||||
<string name="included_activity_placeholder">If you have some folders which contain media, but were not recognized by the app, you can add them manually here.</string>
|
<string name="included_activity_placeholder">If you have some folders which contain media, but were not recognized by the app, you can add them manually here.\n\nAdding some items here will not exclude any other folder.</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Resize</string>
|
<string name="resize">Resize</string>
|
||||||
|
@ -124,7 +124,10 @@
|
||||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||||
|
<string name="show_media_count">Show folder media count on the main view</string>
|
||||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||||
|
<string name="show_extended_details">Show extended details over fullscreen media</string>
|
||||||
|
<string name="manage_extended_details">Manage extended details</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<style name="AppTheme" parent="AppTheme.Base">
|
<style name="AppTheme" parent="AppTheme.Base"/>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="FullScreenTheme.Base" parent="AppTheme">
|
<style name="FullScreenTheme.Base" parent="AppTheme">
|
||||||
<item name="android:windowContentOverlay">@null</item>
|
<item name="android:windowContentOverlay">@null</item>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<paths>
|
<paths>
|
||||||
<external-path name="external_files" path="."/>
|
<external-path name="external_files" path="."/>
|
||||||
|
<root-path name="external_files" path="/storage/" />
|
||||||
</paths>
|
</paths>
|
||||||
|
|
|
@ -5,7 +5,7 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:3.0.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
@ -16,6 +16,7 @@ allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
|
maven { url "https://maven.google.com" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Fri Mar 03 19:10:52 CET 2017
|
#Tue Nov 07 16:59:29 CET 2017
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||||
|
|
Loading…
Reference in a new issue