commit
4608df3d74
81 changed files with 3868 additions and 1269 deletions
91
CHANGELOG.md
91
CHANGELOG.md
|
@ -1,6 +1,97 @@
|
|||
Changelog
|
||||
==========
|
||||
|
||||
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)*
|
||||
----------------------------
|
||||
|
||||
* Updated commons library with minor fixes
|
||||
|
||||
Version 2.15.0 *(2017-10-01)*
|
||||
----------------------------
|
||||
|
||||
* Added fingerprint to hidden item protection
|
||||
* Added a new List view type
|
||||
* Fixed an issue with some hidden items being shown at "Show all folders content"
|
||||
* Fixed typing in color hex codes manually with some keyboards
|
||||
* Do not autosave rotated images in any case
|
||||
* Tons of other performance, stability and UX improvements
|
||||
|
||||
Version 2.14.4 *(2017-09-18)*
|
||||
----------------------------
|
||||
|
||||
* Revert to the old way of loading fullscreen images to avoid issues on Android 7+
|
||||
|
||||
Version 2.14.3 *(2017-09-17)*
|
||||
----------------------------
|
||||
|
||||
* Removed some error toast messages after delete, or if image loading failed
|
||||
* Fixed some visual glitches at horizontal scrolling
|
||||
* Disable pull-to-refresh at horizontal scrolling
|
||||
* Many other smaller bugfixes and improvements
|
||||
|
||||
Version 2.14.2 *(2017-09-11)*
|
||||
----------------------------
|
||||
|
||||
* Fixing some glitches with fullscreen images
|
||||
* Add an extra check to avoid displaying non-existing media
|
||||
* Fix opening media from third party intents
|
||||
|
||||
Version 2.14.1 *(2017-09-07)*
|
||||
----------------------------
|
||||
|
||||
* Fixing some glitches around fullscreen view
|
||||
|
||||
Version 2.14.0 *(2017-09-05)*
|
||||
----------------------------
|
||||
|
||||
* Simplified the way of creating new folders
|
||||
* Added a loop option to slideshows, slowed down the swipe animation
|
||||
* Added an option to filter out gifs from slideshows
|
||||
* Improved the quality of fullscreen images
|
||||
* Properly allow excluding the root folder
|
||||
|
||||
Version 2.13.4 *(2017-09-01)*
|
||||
----------------------------
|
||||
|
||||
* Improved the image loading performance
|
||||
* Added a switch for disabling video gestures
|
||||
* Added a switch for deleting empty folders after deleting content
|
||||
* Show excluded folder content at third party intent if needed
|
||||
|
||||
Version 2.13.3 *(2017-08-29)*
|
||||
----------------------------
|
||||
|
||||
* Fixing copy/move actions on some devices
|
||||
|
||||
Version 2.13.2 *(2017-08-28)*
|
||||
----------------------------
|
||||
|
||||
* Moved media type filter from Settings to the Action menu
|
||||
* Allow filtering GIFs out
|
||||
* Make sure we always show manually included folders
|
||||
* Properly show hidden files, when open from some File Manager
|
||||
|
||||
Version 2.13.1 *(2017-08-16)*
|
||||
----------------------------
|
||||
|
||||
* Show a folder if its both excluded and included
|
||||
* Many translation improvements
|
||||
|
||||
Version 2.13.0 *(2017-08-07)*
|
||||
----------------------------
|
||||
|
||||
|
|
192
LICENSE
192
LICENSE
|
@ -1,10 +1,198 @@
|
|||
Copyright 2016 SimpleMobileTools
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2017 SimpleMobileTools
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
|
|
@ -4,14 +4,14 @@ apply plugin: 'kotlin-android-extensions'
|
|||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.2"
|
||||
buildToolsVersion "25.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.gallery"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 23
|
||||
versionCode 124
|
||||
versionName "2.13.1"
|
||||
versionCode 136
|
||||
versionName "2.16.0"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
@ -37,7 +37,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.simplemobiletools:commons:2.25.4'
|
||||
compile 'com.simplemobiletools:commons:2.30.6'
|
||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||
|
@ -52,7 +52,7 @@ dependencies {
|
|||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.1.4-2'
|
||||
ext.kotlin_version = '1.1.51'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
|
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
|
@ -1,5 +1,2 @@
|
|||
-keep class com.simplemobiletools.** { *; }
|
||||
-dontwarn com.simplemobiletools.**
|
||||
|
||||
-renamesourcefileattribute SourceFile
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
package com.simplemobiletools.gallery
|
||||
|
||||
import android.app.Application
|
||||
import com.github.ajalt.reprint.core.Reprint
|
||||
import com.squareup.leakcanary.LeakCanary
|
||||
|
||||
class App : Application() {
|
||||
val USE_LEAK_CANARY = false
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
Reprint.initialize(this)
|
||||
if (USE_LEAK_CANARY) {
|
||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||
return
|
||||
|
|
|
@ -172,7 +172,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
|
||||
try {
|
||||
getFileOutputStream(file) {
|
||||
if (it != null) {
|
||||
saveBitmap(file, bitmap, it)
|
||||
} else {
|
||||
toast(R.string.image_editing_failed)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Crop compressing failed $path $e")
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
package com.simplemobiletools.gallery.activities
|
||||
|
||||
import android.Manifest
|
||||
import android.app.Activity
|
||||
import android.content.ClipData
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.os.AsyncTask
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.provider.MediaStore
|
||||
import android.support.v4.app.ActivityCompat
|
||||
import android.support.v7.widget.GridLayoutManager
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.ViewGroup
|
||||
import android.widget.FrameLayout
|
||||
import com.google.gson.Gson
|
||||
import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
|
||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.commons.models.Release
|
||||
import com.simplemobiletools.commons.views.MyScalableRecyclerView
|
||||
import com.simplemobiletools.gallery.BuildConfig
|
||||
|
@ -25,6 +29,7 @@ import com.simplemobiletools.gallery.R
|
|||
import com.simplemobiletools.gallery.adapters.DirectoryAdapter
|
||||
import com.simplemobiletools.gallery.asynctasks.GetDirectoriesAsynctask
|
||||
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog
|
||||
import com.simplemobiletools.gallery.dialogs.FilterMediaDialog
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
import com.simplemobiletools.gallery.helpers.*
|
||||
import com.simplemobiletools.gallery.models.Directory
|
||||
|
@ -33,7 +38,6 @@ import java.io.*
|
|||
import java.util.*
|
||||
|
||||
class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||
private val STORAGE_PERMISSION = 1
|
||||
private val PICK_MEDIA = 2
|
||||
private val PICK_WALLPAPER = 3
|
||||
private val LAST_MEDIA_CHECK_PERIOD = 3000L
|
||||
|
@ -46,20 +50,22 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
private var mIsGetVideoContentIntent = false
|
||||
private var mIsGetAnyContentIntent = false
|
||||
private var mIsSetWallpaperIntent = false
|
||||
private var mAllowPickingMultiple = false
|
||||
private var mIsThirdPartyIntent = false
|
||||
private var mIsGettingDirs = false
|
||||
private var mStoredAnimateGifs = true
|
||||
private var mStoredCropThumbnails = true
|
||||
private var mStoredScrollHorizontally = true
|
||||
private var mStoredTextColor = 0
|
||||
private var mLoadedInitialPhotos = false
|
||||
private var mLastMediaModified = 0
|
||||
private var mLatestMediaId = 0L
|
||||
private var mLastMediaHandler = Handler()
|
||||
|
||||
private var mCurrAsyncTask: GetDirectoriesAsynctask? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
storeStoragePaths()
|
||||
|
||||
mIsPickImageIntent = isPickImageIntent(intent)
|
||||
mIsPickVideoIntent = isPickVideoIntent(intent)
|
||||
|
@ -67,16 +73,22 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
mIsGetVideoContentIntent = isGetVideoContentIntent(intent)
|
||||
mIsGetAnyContentIntent = isGetAnyContentIntent(intent)
|
||||
mIsSetWallpaperIntent = isSetWallpaperIntent(intent)
|
||||
mAllowPickingMultiple = intent.getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false)
|
||||
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
||||
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
||||
|
||||
removeTempFolder()
|
||||
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
||||
mDirs = ArrayList<Directory>()
|
||||
mDirs = ArrayList()
|
||||
mStoredAnimateGifs = config.animateGifs
|
||||
mStoredCropThumbnails = config.cropThumbnails
|
||||
mStoredScrollHorizontally = config.scrollHorizontally
|
||||
storeStoragePaths()
|
||||
mStoredTextColor = config.textColor
|
||||
checkWhatsNewDialog()
|
||||
|
||||
directories_empty_text.setOnClickListener {
|
||||
showFilterMediaDialog()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
@ -84,8 +96,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
menuInflater.inflate(R.menu.menu_main_intent, menu)
|
||||
} else {
|
||||
menuInflater.inflate(R.menu.menu_main, menu)
|
||||
menu.findItem(R.id.increase_column_count).isVisible = config.dirColumnCnt < 10
|
||||
menu.findItem(R.id.reduce_column_count).isVisible = config.dirColumnCnt > 1
|
||||
menu.findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < 10
|
||||
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.stop_showing_hidden).isVisible = config.temporarilyShowHidden
|
||||
|
@ -95,10 +107,13 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.sort -> showSortingDialog()
|
||||
R.id.filter -> showFilterMediaDialog()
|
||||
R.id.open_camera -> launchCamera()
|
||||
R.id.show_all -> showAllMedia()
|
||||
R.id.change_view_type -> changeViewType()
|
||||
R.id.temporarily_show_hidden -> tryToggleTemporarilyShowHidden()
|
||||
R.id.stop_showing_hidden -> tryToggleTemporarilyShowHidden()
|
||||
R.id.create_new_folder -> createNewFolder()
|
||||
R.id.increase_column_count -> increaseColumnCount()
|
||||
R.id.reduce_column_count -> reduceColumnCount()
|
||||
R.id.settings -> launchSettings()
|
||||
|
@ -110,6 +125,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
config.isThirdPartyIntent = false
|
||||
if (mStoredAnimateGifs != config.animateGifs) {
|
||||
directories_grid.adapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
@ -119,54 +135,66 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
if (mStoredScrollHorizontally != config.scrollHorizontally) {
|
||||
directories_grid.adapter?.let {
|
||||
(it as DirectoryAdapter).scrollVertically = !config.scrollHorizontally
|
||||
it.notifyDataSetChanged()
|
||||
(directories_grid.adapter as? DirectoryAdapter)?.apply {
|
||||
scrollVertically = config.viewTypeFolders == VIEW_TYPE_LIST || !config.scrollHorizontally
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
setupScrollDirection()
|
||||
}
|
||||
|
||||
if (mStoredTextColor != config.textColor) {
|
||||
(directories_grid.adapter as? DirectoryAdapter)?.updateTextColor(config.textColor)
|
||||
}
|
||||
|
||||
tryloadGallery()
|
||||
invalidateOptionsMenu()
|
||||
directories_empty_text_label.setTextColor(config.textColor)
|
||||
directories_empty_text.setTextColor(config.primaryColor)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
mCurrAsyncTask?.shouldStop = true
|
||||
storeDirectories()
|
||||
directories_refresh_layout.isRefreshing = false
|
||||
mIsGettingDirs = false
|
||||
mStoredAnimateGifs = config.animateGifs
|
||||
mStoredCropThumbnails = config.cropThumbnails
|
||||
mStoredScrollHorizontally = config.scrollHorizontally
|
||||
mStoredTextColor = config.textColor
|
||||
directories_grid.listener = null
|
||||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||
|
||||
if (!mDirs.isEmpty()) {
|
||||
mCurrAsyncTask?.stopFetching()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
config.temporarilyShowHidden = false
|
||||
removeTempFolder()
|
||||
}
|
||||
|
||||
private fun removeTempFolder() {
|
||||
val newFolder = File(config.tempFolderPath)
|
||||
if (newFolder.exists() && newFolder.isDirectory) {
|
||||
if (newFolder.list()?.isEmpty() == true) {
|
||||
deleteFileBg(newFolder, true) { }
|
||||
}
|
||||
}
|
||||
config.tempFolderPath = ""
|
||||
}
|
||||
|
||||
private fun tryloadGallery() {
|
||||
if (hasWriteStoragePermission()) {
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
if (config.showAll)
|
||||
showAllMedia()
|
||||
else
|
||||
getDirectories()
|
||||
|
||||
setupLayoutManager()
|
||||
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 {
|
||||
toast(R.string.no_storage_permissions)
|
||||
finish()
|
||||
|
@ -181,7 +209,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
mIsGettingDirs = true
|
||||
val dirs = getCachedDirectories()
|
||||
if (dirs.isNotEmpty() && !mLoadedInitialPhotos) {
|
||||
gotDirectories(dirs)
|
||||
gotDirectories(dirs, true)
|
||||
}
|
||||
|
||||
if (!mLoadedInitialPhotos) {
|
||||
|
@ -190,13 +218,24 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
|
||||
mLoadedInitialPhotos = true
|
||||
mCurrAsyncTask = GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) {
|
||||
gotDirectories(it)
|
||||
gotDirectories(addTempFolderIfNeeded(it), false)
|
||||
}
|
||||
mCurrAsyncTask!!.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR)
|
||||
mCurrAsyncTask!!.execute()
|
||||
}
|
||||
|
||||
private fun showSortingDialog() {
|
||||
ChangeSortingDialog(this, true, false) {
|
||||
if (config.directorySorting and SORT_BY_DATE_MODIFIED > 0 || config.directorySorting and SORT_BY_DATE_TAKEN > 0) {
|
||||
getDirectories()
|
||||
} else {
|
||||
gotDirectories(mDirs, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showFilterMediaDialog() {
|
||||
FilterMediaDialog(this) {
|
||||
directories_refresh_layout.isRefreshing = true
|
||||
getDirectories()
|
||||
}
|
||||
}
|
||||
|
@ -205,10 +244,29 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
config.showAll = true
|
||||
Intent(this, MediaActivity::class.java).apply {
|
||||
putExtra(DIRECTORY, "/")
|
||||
|
||||
if (mIsThirdPartyIntent) {
|
||||
handleMediaIntent(this)
|
||||
} else {
|
||||
startActivity(this)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun changeViewType() {
|
||||
val items = arrayListOf(
|
||||
RadioItem(VIEW_TYPE_GRID, getString(R.string.grid)),
|
||||
RadioItem(VIEW_TYPE_LIST, getString(R.string.list)))
|
||||
|
||||
RadioGroupDialog(this, items, config.viewTypeFolders) {
|
||||
config.viewTypeFolders = it as Int
|
||||
invalidateOptionsMenu()
|
||||
setupLayoutManager()
|
||||
directories_grid.adapter = null
|
||||
setupAdapter()
|
||||
}
|
||||
}
|
||||
|
||||
private fun tryToggleTemporarilyShowHidden() {
|
||||
if (config.temporarilyShowHidden) {
|
||||
|
@ -247,6 +305,13 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
private fun getRecyclerAdapter() = (directories_grid.adapter as DirectoryAdapter)
|
||||
|
||||
private fun setupLayoutManager() {
|
||||
if (config.viewTypeFolders == VIEW_TYPE_GRID)
|
||||
setupGridLayoutManager()
|
||||
else
|
||||
setupListLayoutManager()
|
||||
}
|
||||
|
||||
private fun setupGridLayoutManager() {
|
||||
val layoutManager = directories_grid.layoutManager as GridLayoutManager
|
||||
if (config.scrollHorizontally) {
|
||||
layoutManager.orientation = GridLayoutManager.HORIZONTAL
|
||||
|
@ -284,6 +349,25 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupListLayoutManager() {
|
||||
directories_grid.isDragSelectionEnabled = true
|
||||
directories_grid.isZoomingEnabled = false
|
||||
|
||||
val layoutManager = directories_grid.layoutManager as GridLayoutManager
|
||||
layoutManager.spanCount = 1
|
||||
layoutManager.orientation = GridLayoutManager.VERTICAL
|
||||
directories_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
|
||||
private fun createNewFolder() {
|
||||
FilePickerDialog(this, internalStoragePath, false, config.shouldShowHidden) {
|
||||
CreateNewFolderDialog(this, it) {
|
||||
config.tempFolderPath = it
|
||||
gotDirectories(addTempFolderIfNeeded(mDirs), true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun increaseColumnCount() {
|
||||
config.dirColumnCnt = ++(directories_grid.layoutManager as GridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
|
@ -326,12 +410,33 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
if (requestCode == PICK_MEDIA && resultData?.data != null) {
|
||||
Intent().apply {
|
||||
if (requestCode == PICK_MEDIA && resultData != null) {
|
||||
val resultIntent = Intent()
|
||||
if (mIsGetImageContentIntent || mIsGetVideoContentIntent || mIsGetAnyContentIntent) {
|
||||
when {
|
||||
intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true -> fillExtraOutput(resultData)
|
||||
resultData.extras?.containsKey(PICKED_PATHS) == true -> fillPickedPaths(resultData, resultIntent)
|
||||
else -> fillIntentPath(resultData, resultIntent)
|
||||
}
|
||||
} else if ((mIsPickImageIntent || mIsPickVideoIntent)) {
|
||||
val path = resultData.data.path
|
||||
val uri = Uri.fromFile(File(path))
|
||||
if (mIsGetImageContentIntent || mIsGetVideoContentIntent || mIsGetAnyContentIntent) {
|
||||
if (intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true) {
|
||||
resultIntent.data = uri
|
||||
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||
}
|
||||
|
||||
setResult(Activity.RESULT_OK, resultIntent)
|
||||
finish()
|
||||
} else if (requestCode == PICK_WALLPAPER) {
|
||||
setResult(Activity.RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
}
|
||||
|
||||
private fun fillExtraOutput(resultData: Intent) {
|
||||
val path = resultData.data.path
|
||||
var inputStream: InputStream? = null
|
||||
var outputStream: OutputStream? = null
|
||||
try {
|
||||
|
@ -344,31 +449,37 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
inputStream?.close()
|
||||
outputStream?.close()
|
||||
}
|
||||
} else {
|
||||
val type = File(path).getMimeType("image/jpeg")
|
||||
setDataAndTypeAndNormalize(uri, type)
|
||||
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION
|
||||
}
|
||||
} else if (mIsPickImageIntent || mIsPickVideoIntent) {
|
||||
data = uri
|
||||
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||
}
|
||||
|
||||
setResult(Activity.RESULT_OK, this)
|
||||
private fun fillPickedPaths(resultData: Intent, resultIntent: Intent) {
|
||||
val paths = resultData.extras.getStringArrayList(PICKED_PATHS)
|
||||
val uris = paths.map { Uri.fromFile(File(it)) } as ArrayList
|
||||
val clipData = ClipData("Attachment", arrayOf("image/*", "video/*"), ClipData.Item(uris.removeAt(0)))
|
||||
|
||||
uris.forEach {
|
||||
clipData.addItem(ClipData.Item(it))
|
||||
}
|
||||
finish()
|
||||
} else if (requestCode == PICK_WALLPAPER) {
|
||||
setResult(Activity.RESULT_OK)
|
||||
finish()
|
||||
|
||||
resultIntent.clipData = clipData
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
|
||||
private fun fillIntentPath(resultData: Intent, resultIntent: Intent) {
|
||||
val path = resultData.data.path
|
||||
val uri = Uri.fromFile(File(path))
|
||||
val type = File(path).getMimeType("image/jpeg")
|
||||
resultIntent.setDataAndTypeAndNormalize(uri, type)
|
||||
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION
|
||||
}
|
||||
|
||||
private fun itemClicked(path: String) {
|
||||
Intent(this, MediaActivity::class.java).apply {
|
||||
putExtra(DIRECTORY, path)
|
||||
handleMediaIntent(this)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleMediaIntent(intent: Intent) {
|
||||
intent.apply {
|
||||
if (mIsSetWallpaperIntent) {
|
||||
putExtra(SET_WALLPAPER_INTENT, true)
|
||||
startActivityForResult(this, PICK_WALLPAPER)
|
||||
|
@ -376,30 +487,38 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
putExtra(GET_IMAGE_INTENT, mIsPickImageIntent || mIsGetImageContentIntent)
|
||||
putExtra(GET_VIDEO_INTENT, mIsPickVideoIntent || mIsGetVideoContentIntent)
|
||||
putExtra(GET_ANY_INTENT, mIsGetAnyContentIntent)
|
||||
putExtra(Intent.EXTRA_ALLOW_MULTIPLE, mAllowPickingMultiple)
|
||||
startActivityForResult(this, PICK_MEDIA)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun gotDirectories(dirs: ArrayList<Directory>) {
|
||||
mLastMediaModified = getLastMediaModified()
|
||||
private fun gotDirectories(newDirs: ArrayList<Directory>, isFromCache: Boolean) {
|
||||
val dirs = getSortedDirectories(newDirs)
|
||||
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
directories_refresh_layout.isRefreshing = false
|
||||
mIsGettingDirs = false
|
||||
|
||||
directories_empty_text_label.beVisibleIf(dirs.isEmpty() && !isFromCache)
|
||||
directories_empty_text.beVisibleIf(dirs.isEmpty() && !isFromCache)
|
||||
|
||||
checkLastMediaChanged()
|
||||
if (dirs.hashCode() == mDirs.hashCode())
|
||||
if (dirs.hashCode() == mDirs.hashCode()) {
|
||||
return
|
||||
}
|
||||
|
||||
mDirs = dirs
|
||||
|
||||
runOnUiThread {
|
||||
setupAdapter()
|
||||
}
|
||||
|
||||
storeDirectories()
|
||||
}
|
||||
|
||||
private fun storeDirectories() {
|
||||
if (!config.temporarilyShowHidden) {
|
||||
if (!config.temporarilyShowHidden && config.tempFolderPath.isEmpty()) {
|
||||
val directories = Gson().toJson(mDirs)
|
||||
config.directories = directories
|
||||
}
|
||||
|
@ -418,13 +537,16 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
private fun setupScrollDirection() {
|
||||
val allowHorizontalScroll = config.scrollHorizontally && config.viewTypeFolders == VIEW_TYPE_GRID
|
||||
directories_refresh_layout.isEnabled = !config.scrollHorizontally
|
||||
|
||||
directories_vertical_fastscroller.isHorizontal = false
|
||||
directories_vertical_fastscroller.beGoneIf(config.scrollHorizontally)
|
||||
directories_vertical_fastscroller.beGoneIf(allowHorizontalScroll)
|
||||
|
||||
directories_horizontal_fastscroller.isHorizontal = true
|
||||
directories_horizontal_fastscroller.beVisibleIf(config.scrollHorizontally)
|
||||
directories_horizontal_fastscroller.beVisibleIf(allowHorizontalScroll)
|
||||
|
||||
if (config.scrollHorizontally) {
|
||||
if (allowHorizontalScroll) {
|
||||
directories_horizontal_fastscroller.setViews(directories_grid, directories_refresh_layout)
|
||||
} else {
|
||||
directories_vertical_fastscroller.setViews(directories_grid, directories_refresh_layout)
|
||||
|
@ -438,9 +560,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||
mLastMediaHandler.postDelayed({
|
||||
Thread({
|
||||
val lastModified = getLastMediaModified()
|
||||
if (mLastMediaModified != lastModified) {
|
||||
mLastMediaModified = lastModified
|
||||
val mediaId = getLatestMediaId()
|
||||
if (mLatestMediaId != mediaId) {
|
||||
mLatestMediaId = mediaId
|
||||
runOnUiThread {
|
||||
getDirectories()
|
||||
}
|
||||
|
@ -459,6 +581,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
directories_grid.setDragSelectActive(position)
|
||||
}
|
||||
|
||||
override fun recheckPinnedFolders() {
|
||||
gotDirectories(movePinnedDirectoriesToFront(mDirs), true)
|
||||
}
|
||||
|
||||
private fun checkWhatsNewDialog() {
|
||||
arrayListOf<Release>().apply {
|
||||
add(Release(46, R.string.release_46))
|
||||
|
@ -494,6 +620,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
add(Release(119, R.string.release_119))
|
||||
add(Release(122, R.string.release_122))
|
||||
add(Release(123, R.string.release_123))
|
||||
add(Release(125, R.string.release_125))
|
||||
add(Release(127, R.string.release_127))
|
||||
add(Release(133, R.string.release_133))
|
||||
add(Release(136, R.string.release_136))
|
||||
checkWhatsNew(this, BuildConfig.VERSION_CODE)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,15 +18,18 @@ import com.bumptech.glide.request.RequestOptions
|
|||
import com.bumptech.glide.request.target.SimpleTarget
|
||||
import com.bumptech.glide.request.transition.Transition
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.commons.views.MyScalableRecyclerView
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.adapters.MediaAdapter
|
||||
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
||||
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog
|
||||
import com.simplemobiletools.gallery.dialogs.ExcludeFolderDialog
|
||||
import com.simplemobiletools.gallery.dialogs.FilterMediaDialog
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
import com.simplemobiletools.gallery.helpers.*
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
|
@ -35,8 +38,7 @@ import java.io.File
|
|||
import java.io.IOException
|
||||
|
||||
class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||
private val TAG = MediaActivity::class.java.simpleName
|
||||
private val SAVE_MEDIA_CNT = 40
|
||||
private val SAVE_MEDIA_CNT = 100
|
||||
private val LAST_MEDIA_CHECK_PERIOD = 3000L
|
||||
|
||||
private var mPath = ""
|
||||
|
@ -44,14 +46,17 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
private var mIsGetVideoIntent = false
|
||||
private var mIsGetAnyIntent = false
|
||||
private var mIsGettingMedia = false
|
||||
private var mAllowPickingMultiple = false
|
||||
private var mShowAll = false
|
||||
private var mLoadedInitialPhotos = false
|
||||
private var mStoredAnimateGifs = true
|
||||
private var mStoredCropThumbnails = true
|
||||
private var mStoredScrollHorizontally = true
|
||||
private var mStoredTextColor = 0
|
||||
private var mLastDrawnHashCode = 0
|
||||
private var mLastMediaModified = 0
|
||||
private var mLatestMediaId = 0L
|
||||
private var mLastMediaHandler = Handler()
|
||||
private var mCurrAsyncTask: GetMediaAsynctask? = null
|
||||
|
||||
companion object {
|
||||
var mMedia = ArrayList<Medium>()
|
||||
|
@ -64,6 +69,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
mIsGetImageIntent = getBooleanExtra(GET_IMAGE_INTENT, false)
|
||||
mIsGetVideoIntent = getBooleanExtra(GET_VIDEO_INTENT, false)
|
||||
mIsGetAnyIntent = getBooleanExtra(GET_ANY_INTENT, false)
|
||||
mAllowPickingMultiple = getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false)
|
||||
}
|
||||
|
||||
media_refresh_layout.setOnRefreshListener({ getMedia() })
|
||||
|
@ -71,9 +77,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
mStoredAnimateGifs = config.animateGifs
|
||||
mStoredCropThumbnails = config.cropThumbnails
|
||||
mStoredScrollHorizontally = config.scrollHorizontally
|
||||
mStoredTextColor = config.textColor
|
||||
mShowAll = config.showAll
|
||||
if (mShowAll)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
||||
|
||||
media_empty_text.setOnClickListener {
|
||||
showFilterMediaDialog()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -87,15 +98,21 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
}
|
||||
|
||||
if (mStoredScrollHorizontally != config.scrollHorizontally) {
|
||||
media_grid.adapter?.let {
|
||||
(it as MediaAdapter).scrollVertically = !config.scrollHorizontally
|
||||
it.notifyDataSetChanged()
|
||||
(media_grid.adapter as? MediaAdapter)?.apply {
|
||||
scrollVertically = config.viewTypeFiles == VIEW_TYPE_LIST || !config.scrollHorizontally
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
setupScrollDirection()
|
||||
}
|
||||
|
||||
if (mStoredTextColor != config.textColor) {
|
||||
(media_grid.adapter as? MediaAdapter)?.updateTextColor(config.textColor)
|
||||
}
|
||||
|
||||
tryloadGallery()
|
||||
invalidateOptionsMenu()
|
||||
media_empty_text_label.setTextColor(config.textColor)
|
||||
media_empty_text.setTextColor(config.primaryColor)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
@ -105,8 +122,13 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
mStoredAnimateGifs = config.animateGifs
|
||||
mStoredCropThumbnails = config.cropThumbnails
|
||||
mStoredScrollHorizontally = config.scrollHorizontally
|
||||
mStoredTextColor = config.textColor
|
||||
media_grid.listener = null
|
||||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||
|
||||
if (!mMedia.isEmpty()) {
|
||||
mCurrAsyncTask?.stopFetching()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -117,16 +139,19 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
}
|
||||
|
||||
private fun tryloadGallery() {
|
||||
if (hasWriteStoragePermission()) {
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
val dirName = getHumanizedFilename(mPath)
|
||||
title = if (mShowAll) resources.getString(R.string.all_folders) else dirName
|
||||
getMedia()
|
||||
setupLayoutManager()
|
||||
checkIfColorChanged()
|
||||
} else {
|
||||
toast(R.string.no_storage_permissions)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkIfColorChanged() {
|
||||
if (media_grid.adapter != null && getRecyclerAdapter().primaryColor != config.primaryColor) {
|
||||
|
@ -142,7 +167,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
|
||||
val currAdapter = media_grid.adapter
|
||||
if (currAdapter == null) {
|
||||
media_grid.adapter = MediaAdapter(this, mMedia, this, mIsGetAnyIntent) {
|
||||
media_grid.adapter = MediaAdapter(this, mMedia, this, mIsGetAnyIntent, mAllowPickingMultiple) {
|
||||
itemClicked(it.path)
|
||||
}
|
||||
} else {
|
||||
|
@ -152,13 +177,16 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
}
|
||||
|
||||
private fun setupScrollDirection() {
|
||||
val allowHorizontalScroll = config.scrollHorizontally && config.viewTypeFiles == VIEW_TYPE_GRID
|
||||
media_refresh_layout.isEnabled = !config.scrollHorizontally
|
||||
|
||||
media_vertical_fastscroller.isHorizontal = false
|
||||
media_vertical_fastscroller.beGoneIf(config.scrollHorizontally)
|
||||
media_vertical_fastscroller.beGoneIf(allowHorizontalScroll)
|
||||
|
||||
media_horizontal_fastscroller.isHorizontal = true
|
||||
media_horizontal_fastscroller.beVisibleIf(config.scrollHorizontally)
|
||||
media_horizontal_fastscroller.beVisibleIf(allowHorizontalScroll)
|
||||
|
||||
if (config.scrollHorizontally) {
|
||||
if (allowHorizontalScroll) {
|
||||
media_horizontal_fastscroller.setViews(media_grid, media_refresh_layout)
|
||||
} else {
|
||||
media_vertical_fastscroller.setViews(media_grid, media_refresh_layout)
|
||||
|
@ -172,9 +200,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||
mLastMediaHandler.postDelayed({
|
||||
Thread({
|
||||
val lastModified = getLastMediaModified()
|
||||
if (mLastMediaModified != lastModified) {
|
||||
mLastMediaModified = lastModified
|
||||
val mediaId = getLatestMediaId()
|
||||
if (mLatestMediaId != mediaId) {
|
||||
mLatestMediaId = mediaId
|
||||
runOnUiThread {
|
||||
getMedia()
|
||||
}
|
||||
|
@ -200,8 +228,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
|
||||
findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden
|
||||
|
||||
findItem(R.id.increase_column_count).isVisible = config.mediaColumnCnt < 10
|
||||
findItem(R.id.reduce_column_count).isVisible = config.mediaColumnCnt > 1
|
||||
findItem(R.id.increase_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt < 10
|
||||
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
|
||||
}
|
||||
|
||||
return true
|
||||
|
@ -210,9 +240,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.sort -> showSortingDialog()
|
||||
R.id.filter -> showFilterMediaDialog()
|
||||
R.id.toggle_filename -> toggleFilenameVisibility()
|
||||
R.id.open_camera -> launchCamera()
|
||||
R.id.folder_view -> switchToFolderView()
|
||||
R.id.change_view_type -> changeViewType()
|
||||
R.id.hide_folder -> tryHideFolder()
|
||||
R.id.unhide_folder -> unhideFolder()
|
||||
R.id.exclude_folder -> tryExcludeFolder()
|
||||
|
@ -227,24 +259,45 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
return true
|
||||
}
|
||||
|
||||
private fun toggleFilenameVisibility() {
|
||||
config.displayFileNames = !config.displayFileNames
|
||||
if (media_grid.adapter != null)
|
||||
getRecyclerAdapter().updateDisplayFilenames(config.displayFileNames)
|
||||
}
|
||||
|
||||
private fun showSortingDialog() {
|
||||
ChangeSortingDialog(this, false, !config.showAll, mPath) {
|
||||
getMedia()
|
||||
}
|
||||
}
|
||||
|
||||
private fun showFilterMediaDialog() {
|
||||
FilterMediaDialog(this) {
|
||||
media_refresh_layout.isRefreshing = true
|
||||
getMedia()
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleFilenameVisibility() {
|
||||
config.displayFileNames = !config.displayFileNames
|
||||
if (media_grid.adapter != null)
|
||||
getRecyclerAdapter().updateDisplayFilenames(config.displayFileNames)
|
||||
}
|
||||
|
||||
private fun switchToFolderView() {
|
||||
config.showAll = false
|
||||
startActivity(Intent(this, MainActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
|
||||
private fun changeViewType() {
|
||||
val items = arrayListOf(
|
||||
RadioItem(VIEW_TYPE_GRID, getString(R.string.grid)),
|
||||
RadioItem(VIEW_TYPE_LIST, getString(R.string.list)))
|
||||
|
||||
RadioGroupDialog(this, items, config.viewTypeFiles) {
|
||||
config.viewTypeFiles = it as Int
|
||||
invalidateOptionsMenu()
|
||||
setupLayoutManager()
|
||||
media_grid.adapter = null
|
||||
setupAdapter()
|
||||
}
|
||||
}
|
||||
|
||||
private fun tryHideFolder() {
|
||||
if (config.wasHideFolderTooltipShown) {
|
||||
hideFolder()
|
||||
|
@ -283,8 +336,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
|
||||
private fun deleteDirectoryIfEmpty() {
|
||||
val file = File(mPath)
|
||||
if (!file.isDownloadsFolder() && file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
file.delete()
|
||||
if (config.deleteEmptyFolders && !file.isDownloadsFolder() && file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
deleteFile(file, true) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -293,22 +346,22 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
return
|
||||
|
||||
mIsGettingMedia = true
|
||||
val token = object : TypeToken<List<Medium>>() {}.type
|
||||
val media = Gson().fromJson<ArrayList<Medium>>(config.loadFolderMedia(mPath), token) ?: ArrayList<Medium>(1)
|
||||
val media = getCachedMedia(mPath)
|
||||
if (media.isNotEmpty() && !mLoadedInitialPhotos) {
|
||||
gotMedia(media)
|
||||
gotMedia(media, true)
|
||||
} else {
|
||||
media_refresh_layout.isRefreshing = true
|
||||
}
|
||||
|
||||
mLoadedInitialPhotos = true
|
||||
GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
||||
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
||||
gotMedia(it)
|
||||
}.execute()
|
||||
}
|
||||
mCurrAsyncTask!!.execute()
|
||||
}
|
||||
|
||||
private fun isDirEmpty(): Boolean {
|
||||
return if (mMedia.size <= 0) {
|
||||
return if (mMedia.size <= 0 && config.filterMedia > 0) {
|
||||
deleteDirectoryIfEmpty()
|
||||
finish()
|
||||
true
|
||||
|
@ -335,6 +388,13 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
private fun getRecyclerAdapter() = (media_grid.adapter as MediaAdapter)
|
||||
|
||||
private fun setupLayoutManager() {
|
||||
if (config.viewTypeFiles == VIEW_TYPE_GRID)
|
||||
setupGridLayoutManager()
|
||||
else
|
||||
setupListLayoutManager()
|
||||
}
|
||||
|
||||
private fun setupGridLayoutManager() {
|
||||
val layoutManager = media_grid.layoutManager as GridLayoutManager
|
||||
if (config.scrollHorizontally) {
|
||||
layoutManager.orientation = GridLayoutManager.HORIZONTAL
|
||||
|
@ -372,6 +432,16 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupListLayoutManager() {
|
||||
media_grid.isDragSelectionEnabled = true
|
||||
media_grid.isZoomingEnabled = false
|
||||
|
||||
val layoutManager = media_grid.layoutManager as GridLayoutManager
|
||||
layoutManager.spanCount = 1
|
||||
layoutManager.orientation = GridLayoutManager.VERTICAL
|
||||
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
|
||||
private fun increaseColumnCount() {
|
||||
config.mediaColumnCnt = ++(media_grid.layoutManager as GridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
|
@ -445,11 +515,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
}
|
||||
}
|
||||
|
||||
private fun gotMedia(media: ArrayList<Medium>) {
|
||||
mLastMediaModified = getLastMediaModified()
|
||||
private fun gotMedia(media: ArrayList<Medium>, isFromCache: Boolean = false) {
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
mIsGettingMedia = false
|
||||
media_refresh_layout.isRefreshing = false
|
||||
|
||||
media_empty_text_label.beVisibleIf(media.isEmpty() && !isFromCache)
|
||||
media_empty_text.beVisibleIf(media.isEmpty() && !isFromCache)
|
||||
|
||||
checkLastMediaChanged()
|
||||
if (mLastDrawnHashCode == 0)
|
||||
mLastDrawnHashCode = media.hashCode()
|
||||
|
@ -479,6 +552,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
if (!it) {
|
||||
toast(R.string.unknown_error_occurred)
|
||||
} else if (mMedia.isEmpty()) {
|
||||
deleteDirectoryIfEmpty()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
@ -494,4 +568,12 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
override fun itemLongClicked(position: Int) {
|
||||
media_grid.setDragSelectActive(position)
|
||||
}
|
||||
|
||||
override fun selectedPaths(paths: ArrayList<String>) {
|
||||
Intent().apply {
|
||||
putExtra(PICKED_PATHS, paths)
|
||||
setResult(Activity.RESULT_OK, this)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,24 @@
|
|||
package com.simplemobiletools.gallery.activities
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.database.Cursor
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.provider.MediaStore
|
||||
import android.support.v4.app.ActivityCompat
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import com.simplemobiletools.commons.extensions.hasWriteStoragePermission
|
||||
import com.simplemobiletools.commons.extensions.scanPath
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
import com.simplemobiletools.gallery.fragments.PhotoFragment
|
||||
import com.simplemobiletools.gallery.fragments.VideoFragment
|
||||
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.MEDIUM
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
|
@ -28,9 +26,9 @@ import kotlinx.android.synthetic.main.fragment_holder.*
|
|||
import java.io.File
|
||||
|
||||
open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentListener {
|
||||
private val STORAGE_PERMISSION = 1
|
||||
private var mMedium: Medium? = null
|
||||
private var mIsFullScreen = false
|
||||
private var mIsFromGallery = false
|
||||
private var mFragment: ViewPagerFragment? = null
|
||||
|
||||
lateinit var mUri: Uri
|
||||
|
@ -42,16 +40,19 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.fragment_holder)
|
||||
|
||||
if (hasWriteStoragePermission()) {
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
checkIntent(savedInstanceState)
|
||||
} 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) {
|
||||
mUri = intent.data ?: return
|
||||
mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false)
|
||||
|
||||
if (mUri.scheme == "file") {
|
||||
scanPath(mUri.path) {}
|
||||
|
@ -60,6 +61,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
return
|
||||
} else {
|
||||
val path = applicationContext.getRealPathFromURI(mUri) ?: ""
|
||||
if (path != mUri.toString()) {
|
||||
scanPath(mUri.path) {}
|
||||
if (path.isNotEmpty()) {
|
||||
sendViewPagerIntent(path)
|
||||
|
@ -67,6 +69,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
showSystemUI()
|
||||
val bundle = Bundle()
|
||||
|
@ -110,22 +113,10 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
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) {
|
||||
Intent(this, ViewPagerActivity::class.java).apply {
|
||||
putExtra(IS_VIEW_INTENT, true)
|
||||
putExtra(IS_FROM_GALLERY, mIsFromGallery)
|
||||
putExtra(MEDIUM, path)
|
||||
startActivity(this)
|
||||
}
|
||||
|
|
|
@ -3,15 +3,21 @@ package com.simplemobiletools.gallery.activities
|
|||
import android.content.Intent
|
||||
import android.content.res.Resources
|
||||
import android.os.Bundle
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.dialogs.SecurityDialog
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT
|
||||
import com.simplemobiletools.commons.helpers.SHOW_ALL_TABS
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.dialogs.ManageExtendedDetailsDialog
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.helpers.*
|
||||
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_SYSTEM_SETTING
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
|
||||
class SettingsActivity : SimpleActivity() {
|
||||
|
@ -38,10 +44,13 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupDarkBackground()
|
||||
setupScrollHorizontally()
|
||||
setupScreenRotation()
|
||||
setupHideSystemUI()
|
||||
setupReplaceShare()
|
||||
setupPasswordProtection()
|
||||
setupShowMedia()
|
||||
setupHideSystemUI()
|
||||
setupDeleteEmptyFolders()
|
||||
setupAllowVideoGestures()
|
||||
setupShowExtendedDetails()
|
||||
setupManageExtendedDetails()
|
||||
updateTextColors(settings_holder)
|
||||
}
|
||||
|
||||
|
@ -163,9 +172,31 @@ class SettingsActivity : SimpleActivity() {
|
|||
config.isPasswordProtectionOn = !hasPasswordProtection
|
||||
config.passwordHash = if (hasPasswordProtection) "" else hash
|
||||
config.protectionType = type
|
||||
|
||||
if (config.isPasswordProtectionOn) {
|
||||
val confirmationTextId = if (config.protectionType == PROTECTION_FINGERPRINT)
|
||||
R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully
|
||||
ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupDeleteEmptyFolders() {
|
||||
settings_delete_empty_folders.isChecked = config.deleteEmptyFolders
|
||||
settings_delete_empty_folders_holder.setOnClickListener {
|
||||
settings_delete_empty_folders.toggle()
|
||||
config.deleteEmptyFolders = settings_delete_empty_folders.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupAllowVideoGestures() {
|
||||
settings_allow_video_gestures.isChecked = config.allowVideoGestures
|
||||
settings_allow_video_gestures_holder.setOnClickListener {
|
||||
settings_allow_video_gestures.toggle()
|
||||
config.allowVideoGestures = settings_allow_video_gestures.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupScreenRotation() {
|
||||
settings_screen_rotation.text = getScreenRotationText()
|
||||
|
@ -188,24 +219,23 @@ class SettingsActivity : SimpleActivity() {
|
|||
else -> R.string.screen_rotation_aspect_ratio
|
||||
})
|
||||
|
||||
private fun setupShowMedia() {
|
||||
settings_show_media.text = getShowMediaText()
|
||||
settings_show_media_holder.setOnClickListener {
|
||||
val items = arrayListOf(
|
||||
RadioItem(IMAGES_AND_VIDEOS, res.getString(R.string.images_and_videos)),
|
||||
RadioItem(IMAGES, res.getString(R.string.images)),
|
||||
RadioItem(VIDEOS, res.getString(R.string.videos)))
|
||||
|
||||
RadioGroupDialog(this@SettingsActivity, items, config.showMedia) {
|
||||
config.showMedia = it as Int
|
||||
settings_show_media.text = getShowMediaText()
|
||||
}
|
||||
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 getShowMediaText() = getString(when (config.showMedia) {
|
||||
IMAGES_AND_VIDEOS -> R.string.images_and_videos
|
||||
IMAGES -> R.string.images
|
||||
else -> R.string.videos
|
||||
})
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package com.simplemobiletools.gallery.activities
|
||||
|
||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.dialogs.PickDirectoryDialog
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.models.Directory
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
|
@ -19,4 +22,15 @@ open class SimpleActivity : BaseSimpleActivity() {
|
|||
copyMoveFilesTo(files, source.trimEnd('/'), it, isCopyOperation, true, callback)
|
||||
}
|
||||
}
|
||||
|
||||
fun addTempFolderIfNeeded(dirs: ArrayList<Directory>): ArrayList<Directory> {
|
||||
val directories = ArrayList<Directory>()
|
||||
val tempFolderPath = config.tempFolderPath
|
||||
if (tempFolderPath.isNotEmpty()) {
|
||||
val newFolder = Directory(tempFolderPath, "", tempFolderPath.getFilenameFromPath(), 0, 0, 0, 0L)
|
||||
directories.add(newFolder)
|
||||
}
|
||||
directories.addAll(dirs)
|
||||
return directories
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.simplemobiletools.gallery.activities
|
||||
|
||||
import android.animation.Animator
|
||||
import android.animation.ValueAnimator
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
|
@ -20,14 +22,16 @@ import android.provider.MediaStore
|
|||
import android.support.v4.view.ViewPager
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.*
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||
import com.simplemobiletools.commons.dialogs.RenameItemDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.activities.MediaActivity.Companion.mMedia
|
||||
import com.simplemobiletools.gallery.adapters.MyPagerAdapter
|
||||
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
||||
import com.simplemobiletools.gallery.dialogs.DeleteWithRememberDialog
|
||||
import com.simplemobiletools.gallery.dialogs.SaveAsDialog
|
||||
import com.simplemobiletools.gallery.dialogs.SlideshowDialog
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
|
@ -50,6 +54,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
private var mPos = -1
|
||||
private var mShowAll = false
|
||||
private var mIsSlideshowActive = false
|
||||
private var mSkipConfirmationDialog = false
|
||||
private var mRotationDegrees = 0f
|
||||
private var mLastHandledOrientation = 0
|
||||
private var mPrevHashcode = 0
|
||||
|
@ -69,11 +74,17 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_medium)
|
||||
|
||||
if (!hasWriteStoragePermission()) {
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
initViewPager()
|
||||
} else {
|
||||
toast(R.string.no_storage_permissions)
|
||||
finish()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initViewPager() {
|
||||
measureScreen()
|
||||
val uri = intent.data
|
||||
if (uri != null) {
|
||||
|
@ -88,8 +99,14 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
cursor?.close()
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
mPath = intent.getStringExtra(MEDIUM)
|
||||
mShowAll = config.showAll
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
finish()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (mPath.isEmpty()) {
|
||||
|
@ -98,28 +115,28 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
return
|
||||
}
|
||||
|
||||
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true && File(mPath).isHidden) {
|
||||
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
||||
if (isShowHiddenFlagNeeded()) {
|
||||
if (!config.isPasswordProtectionOn) {
|
||||
config.temporarilyShowHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
config.isThirdPartyIntent = true
|
||||
}
|
||||
|
||||
showSystemUI()
|
||||
|
||||
mDirectory = File(mPath).parent
|
||||
title = mPath.getFilenameFromPath()
|
||||
|
||||
view_pager.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
view_pager.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && isDestroyed)
|
||||
return
|
||||
|
||||
view_pager.onGlobalLayout {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
||||
if (mMedia.isNotEmpty()) {
|
||||
gotMedia(mMedia)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
reloadViewPager()
|
||||
scanPath(mPath) {}
|
||||
|
@ -145,28 +162,32 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
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 setupOrientationEventListener() {
|
||||
mOrientationEventListener = object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_NORMAL) {
|
||||
override fun onOrientationChanged(orientation: Int) {
|
||||
val currOrient = if (orientation in 45..134) {
|
||||
ORIENT_LANDSCAPE_RIGHT
|
||||
} else if (orientation in 225..314) {
|
||||
ORIENT_LANDSCAPE_LEFT
|
||||
} else {
|
||||
ORIENT_PORTRAIT
|
||||
val currOrient = when (orientation) {
|
||||
in 45..134 -> ORIENT_LANDSCAPE_RIGHT
|
||||
in 225..314 -> ORIENT_LANDSCAPE_LEFT
|
||||
else -> ORIENT_PORTRAIT
|
||||
}
|
||||
|
||||
if (mLastHandledOrientation != currOrient) {
|
||||
mLastHandledOrientation = currOrient
|
||||
|
||||
if (currOrient == ORIENT_LANDSCAPE_LEFT) {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
} else if (currOrient == ORIENT_LANDSCAPE_RIGHT) {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
|
||||
} else {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
requestedOrientation = when (currOrient) {
|
||||
ORIENT_LANDSCAPE_LEFT -> ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
ORIENT_LANDSCAPE_RIGHT -> ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
|
||||
else -> ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -175,8 +196,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (!hasWriteStoragePermission()) {
|
||||
if (!hasPermission(PERMISSION_WRITE_STORAGE)) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))
|
||||
|
||||
|
@ -233,7 +255,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
R.id.menu_unhide -> toggleFileVisibility(false)
|
||||
R.id.menu_share_1 -> 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_edit -> openFileEditor(getCurrentFile())
|
||||
R.id.menu_properties -> showProperties()
|
||||
|
@ -266,12 +288,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
private fun startSlideshow() {
|
||||
if (getMediaForSlideshow()) {
|
||||
view_pager.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
view_pager.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && isDestroyed)
|
||||
return
|
||||
|
||||
view_pager.onGlobalLayout {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
||||
hideSystemUI()
|
||||
mSlideshowInterval = config.slideshowInterval
|
||||
mSlideshowMoveBackwards = config.slideshowMoveBackwards
|
||||
|
@ -279,7 +297,59 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
scheduleSwipe()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun animatePagerTransition(forward: Boolean) {
|
||||
val oldPosition = view_pager.currentItem
|
||||
val animator = ValueAnimator.ofInt(0, view_pager.width)
|
||||
animator.addListener(object : Animator.AnimatorListener {
|
||||
override fun onAnimationRepeat(animation: Animator?) {
|
||||
}
|
||||
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
view_pager.endFakeDrag()
|
||||
|
||||
if (view_pager.currentItem == oldPosition) {
|
||||
slideshowEnded(forward)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAnimationCancel(animation: Animator?) {
|
||||
view_pager.endFakeDrag()
|
||||
}
|
||||
|
||||
override fun onAnimationStart(animation: Animator?) {
|
||||
}
|
||||
})
|
||||
|
||||
animator.interpolator = DecelerateInterpolator()
|
||||
animator.addUpdateListener(object : ValueAnimator.AnimatorUpdateListener {
|
||||
var oldDragPosition = 0
|
||||
override fun onAnimationUpdate(animation: ValueAnimator) {
|
||||
val dragPosition = animation.animatedValue as Int
|
||||
val dragOffset = dragPosition - oldDragPosition
|
||||
oldDragPosition = dragPosition
|
||||
view_pager?.fakeDragBy(dragOffset * (if (forward) 1f else -1f))
|
||||
}
|
||||
})
|
||||
|
||||
animator.duration = SLIDESHOW_SCROLL_DURATION
|
||||
view_pager.beginFakeDrag()
|
||||
animator.start()
|
||||
}
|
||||
|
||||
private fun slideshowEnded(forward: Boolean) {
|
||||
if (config.loopSlideshow) {
|
||||
if (forward) {
|
||||
view_pager.setCurrentItem(0, false)
|
||||
} else {
|
||||
view_pager.setCurrentItem(view_pager.adapter!!.count - 1, false)
|
||||
}
|
||||
} else {
|
||||
stopSlideshow()
|
||||
toast(R.string.slideshow_ended)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,24 +378,23 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
private fun swipeToNextMedium() {
|
||||
val before = view_pager.currentItem
|
||||
view_pager.currentItem = if (mSlideshowMoveBackwards) --view_pager.currentItem else ++view_pager.currentItem
|
||||
if (before == view_pager.currentItem) {
|
||||
stopSlideshow()
|
||||
toast(R.string.slideshow_ended)
|
||||
}
|
||||
animatePagerTransition(!mSlideshowMoveBackwards)
|
||||
}
|
||||
|
||||
private fun getMediaForSlideshow(): Boolean {
|
||||
mSlideshowMedia = mMedia.toMutableList()
|
||||
if (!config.slideshowIncludePhotos) {
|
||||
mSlideshowMedia = mSlideshowMedia.filter { !it.isImage() && !it.isGif() } as MutableList
|
||||
mSlideshowMedia = mSlideshowMedia.filter { !it.isImage() } as MutableList
|
||||
}
|
||||
|
||||
if (!config.slideshowIncludeVideos) {
|
||||
mSlideshowMedia = mSlideshowMedia.filter { it.isImage() || it.isGif() } as MutableList
|
||||
}
|
||||
|
||||
if (!config.slideshowIncludeGIFs) {
|
||||
mSlideshowMedia = mSlideshowMedia.filter { !it.isGif() } as MutableList
|
||||
}
|
||||
|
||||
if (config.slideshowRandomOrder) {
|
||||
Collections.shuffle(mSlideshowMedia)
|
||||
mPos = 0
|
||||
|
@ -347,6 +416,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
private fun copyMoveTo(isCopyOperation: Boolean) {
|
||||
val files = ArrayList<File>(1).apply { add(getCurrentFile()) }
|
||||
tryCopyMoveFilesTo(files, isCopyOperation) {
|
||||
config.tempFolderPath = ""
|
||||
if (!isCopyOperation) {
|
||||
reloadViewPager()
|
||||
}
|
||||
|
@ -368,34 +438,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
private fun rotateImage() {
|
||||
val currentMedium = getCurrentMedium() ?: return
|
||||
if (currentMedium.isJpg() && !isPathOnSD(currentMedium.path)) {
|
||||
rotateByExif()
|
||||
} else {
|
||||
rotateByDegrees()
|
||||
}
|
||||
}
|
||||
|
||||
private fun rotateByExif() {
|
||||
val exif = ExifInterface(getCurrentPath())
|
||||
val rotation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL)
|
||||
val newRotation = getNewRotation(rotation)
|
||||
exif.setAttribute(ExifInterface.TAG_ORIENTATION, newRotation)
|
||||
exif.saveAttributes()
|
||||
File(getCurrentPath()).setLastModified(System.currentTimeMillis())
|
||||
(getCurrentFragment() as? PhotoFragment)?.refreshBitmap()
|
||||
}
|
||||
|
||||
private fun getNewRotation(rotation: Int): String {
|
||||
return when (rotation) {
|
||||
ExifInterface.ORIENTATION_ROTATE_90 -> ExifInterface.ORIENTATION_ROTATE_180
|
||||
ExifInterface.ORIENTATION_ROTATE_180 -> ExifInterface.ORIENTATION_ROTATE_270
|
||||
ExifInterface.ORIENTATION_ROTATE_270 -> ExifInterface.ORIENTATION_NORMAL
|
||||
else -> ExifInterface.ORIENTATION_ROTATE_90
|
||||
}.toString()
|
||||
}
|
||||
|
||||
private fun rotateByDegrees() {
|
||||
mRotationDegrees = (mRotationDegrees + 90) % 360
|
||||
getCurrentFragment()?.let {
|
||||
(it as? PhotoFragment)?.rotateImageViewBy(mRotationDegrees)
|
||||
|
@ -409,10 +451,16 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
Thread({
|
||||
toast(R.string.saving)
|
||||
val selectedFile = File(it)
|
||||
val tmpFile = File(selectedFile.parent, "tmp_${it.getFilenameFromPath()}")
|
||||
val tmpFile = File(selectedFile.parent, ".tmp_${it.getFilenameFromPath()}")
|
||||
try {
|
||||
val bitmap = BitmapFactory.decodeFile(currPath)
|
||||
getFileOutputStream(tmpFile) {
|
||||
if (it == null) {
|
||||
toast(R.string.unknown_error_occurred)
|
||||
deleteFile(tmpFile) {}
|
||||
return@getFileOutputStream
|
||||
}
|
||||
|
||||
saveFile(tmpFile, bitmap, it)
|
||||
if (needsStupidWritePermissions(selectedFile.absolutePath)) {
|
||||
deleteFile(selectedFile) {}
|
||||
|
@ -426,7 +474,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
toast(R.string.out_of_memory_error)
|
||||
deleteFile(tmpFile) {}
|
||||
} catch (e: Exception) {
|
||||
toast(R.string.unknown_error_occurred)
|
||||
showErrorToast(e)
|
||||
deleteFile(tmpFile) {}
|
||||
}
|
||||
}).start()
|
||||
|
@ -439,8 +487,30 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
val bmp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true)
|
||||
bmp.compress(file.getCompressionFormat(), 90, out)
|
||||
out.flush()
|
||||
toast(R.string.file_saved)
|
||||
out.close()
|
||||
toast(R.string.file_saved)
|
||||
mRotationDegrees = 0f
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
private fun isShowHiddenFlagNeeded(): Boolean {
|
||||
val file = File(mPath)
|
||||
if (file.isHidden)
|
||||
return true
|
||||
|
||||
var parent = file.parentFile ?: return false
|
||||
while (true) {
|
||||
if (parent.isHidden || parent.listFiles()?.contains(File(NOMEDIA)) == true) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (parent.absolutePath == "/") {
|
||||
break
|
||||
}
|
||||
parent = parent.parentFile ?: return false
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
private fun getCurrentFragment() = (view_pager.adapter as MyPagerAdapter).getCurrentFragment(view_pager.currentItem)
|
||||
|
@ -521,22 +591,36 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
}
|
||||
|
||||
private fun checkDeleteConfirmation() {
|
||||
if (mSkipConfirmationDialog) {
|
||||
deleteConfirmed()
|
||||
} else {
|
||||
askConfirmDelete()
|
||||
}
|
||||
}
|
||||
|
||||
private fun askConfirmDelete() {
|
||||
ConfirmationDialog(this) {
|
||||
DeleteWithRememberDialog(this) {
|
||||
mSkipConfirmationDialog = it
|
||||
deleteConfirmed()
|
||||
}
|
||||
}
|
||||
|
||||
private fun deleteConfirmed() {
|
||||
deleteFileBg(File(getCurrentMedia()[mPos].path)) {
|
||||
reloadViewPager()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun isDirEmpty(media: ArrayList<Medium>): Boolean {
|
||||
return if (media.isEmpty()) {
|
||||
deleteDirectoryIfEmpty()
|
||||
finish()
|
||||
true
|
||||
} else
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun renameFile() {
|
||||
RenameItemDialog(this, getCurrentPath()) {
|
||||
|
@ -576,10 +660,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
mPrevHashcode = media.hashCode()
|
||||
mMedia = media
|
||||
if (mPos == -1) {
|
||||
mPos = getPositionInList(media)
|
||||
mPos = if (mPos == -1) {
|
||||
getPositionInList(media)
|
||||
} else {
|
||||
mPos = Math.min(mPos, mMedia.size - 1)
|
||||
Math.min(mPos, mMedia.size - 1)
|
||||
}
|
||||
|
||||
updateActionbarTitle()
|
||||
|
@ -590,20 +674,18 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
private fun getPositionInList(items: MutableList<Medium>): Int {
|
||||
mPos = 0
|
||||
var i = 0
|
||||
for (medium in items) {
|
||||
for ((i, medium) in items.withIndex()) {
|
||||
if (medium.path == mPath) {
|
||||
return i
|
||||
}
|
||||
i++
|
||||
}
|
||||
return mPos
|
||||
}
|
||||
|
||||
private fun deleteDirectoryIfEmpty() {
|
||||
val file = File(mDirectory)
|
||||
if (!file.isDownloadsFolder() && file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
file.delete()
|
||||
if (config.deleteEmptyFolders && !file.isDownloadsFolder() && file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
deleteFile(file, true) {}
|
||||
}
|
||||
|
||||
scanPath(mDirectory) {}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.simplemobiletools.gallery.adapters
|
||||
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Build
|
||||
import android.support.v7.view.ActionMode
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.util.SparseArray
|
||||
|
@ -19,9 +20,10 @@ import com.simplemobiletools.gallery.activities.SimpleActivity
|
|||
import com.simplemobiletools.gallery.dialogs.ExcludeFolderDialog
|
||||
import com.simplemobiletools.gallery.dialogs.PickMediumDialog
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_LIST
|
||||
import com.simplemobiletools.gallery.models.AlbumCover
|
||||
import com.simplemobiletools.gallery.models.Directory
|
||||
import kotlinx.android.synthetic.main.directory_item.view.*
|
||||
import kotlinx.android.synthetic.main.directory_item_list.view.*
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
|
@ -30,11 +32,13 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
|
||||
val multiSelector = MultiSelector()
|
||||
val config = activity.config
|
||||
val isListViewType = config.viewTypeFolders == VIEW_TYPE_LIST
|
||||
|
||||
var actMode: ActionMode? = null
|
||||
var itemViews = SparseArray<View>()
|
||||
val selectedPositions = HashSet<Int>()
|
||||
var primaryColor = config.primaryColor
|
||||
var textColor = config.textColor
|
||||
var pinnedFolders = config.pinnedFolders
|
||||
var scrollVertically = !config.scrollHorizontally
|
||||
|
||||
|
@ -42,8 +46,9 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
if (select) {
|
||||
itemViews[pos]?.dir_check?.background?.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN)
|
||||
selectedPositions.add(pos)
|
||||
} else
|
||||
} else {
|
||||
selectedPositions.remove(pos)
|
||||
}
|
||||
|
||||
itemViews[pos]?.dir_check?.beVisibleIf(select)
|
||||
|
||||
|
@ -55,12 +60,12 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
updateTitle(selectedPositions.size)
|
||||
}
|
||||
|
||||
fun updateTitle(cnt: Int) {
|
||||
private fun updateTitle(cnt: Int) {
|
||||
actMode?.title = "$cnt / ${dirs.size}"
|
||||
actMode?.invalidate()
|
||||
}
|
||||
|
||||
val adapterListener = object : MyAdapterListener {
|
||||
private val adapterListener = object : MyAdapterListener {
|
||||
override fun toggleItemSelectionAdapter(select: Boolean, position: Int) {
|
||||
toggleItemSelection(select, position)
|
||||
}
|
||||
|
@ -68,7 +73,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
override fun getSelectedPositions(): HashSet<Int> = selectedPositions
|
||||
}
|
||||
|
||||
val multiSelectorMode = object : ModalMultiSelectorCallback(multiSelector) {
|
||||
private val multiSelectorMode = object : ModalMultiSelectorCallback(multiSelector) {
|
||||
override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.cab_properties -> showProperties()
|
||||
|
@ -118,12 +123,13 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
fun checkHideBtnVisibility(menu: Menu) {
|
||||
var hiddenCnt = 0
|
||||
var unhiddenCnt = 0
|
||||
selectedPositions.map { dirs.getOrNull(it)?.path }.filterNotNull().forEach {
|
||||
if (File(it).containsNoMedia())
|
||||
selectedPositions.mapNotNull { dirs.getOrNull(it)?.path }.forEach {
|
||||
if (File(it).containsNoMedia()) {
|
||||
hiddenCnt++
|
||||
else
|
||||
} else {
|
||||
unhiddenCnt++
|
||||
}
|
||||
}
|
||||
|
||||
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
||||
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
||||
|
@ -133,12 +139,13 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
val pinnedFolders = config.pinnedFolders
|
||||
var pinnedCnt = 0
|
||||
var unpinnedCnt = 0
|
||||
selectedPositions.map { dirs.getOrNull(it)?.path }.filterNotNull().forEach {
|
||||
if (pinnedFolders.contains(it))
|
||||
selectedPositions.mapNotNull { dirs.getOrNull(it)?.path }.forEach {
|
||||
if (pinnedFolders.contains(it)) {
|
||||
pinnedCnt++
|
||||
else
|
||||
} else {
|
||||
unpinnedCnt++
|
||||
}
|
||||
}
|
||||
|
||||
menu.findItem(R.id.cab_pin).isVisible = unpinnedCnt > 0
|
||||
menu.findItem(R.id.cab_unpin).isVisible = pinnedCnt > 0
|
||||
|
@ -211,13 +218,14 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
}
|
||||
|
||||
private fun pinFolders(pin: Boolean) {
|
||||
if (pin)
|
||||
if (pin) {
|
||||
config.addPinnedFolders(getSelectedPaths())
|
||||
else
|
||||
} else {
|
||||
config.removePinnedFolders(getSelectedPaths())
|
||||
}
|
||||
|
||||
pinnedFolders = config.pinnedFolders
|
||||
listener?.refreshItems()
|
||||
listener?.recheckPinnedFolders()
|
||||
notifyDataSetChanged()
|
||||
actMode?.finish()
|
||||
}
|
||||
|
@ -233,6 +241,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
}
|
||||
|
||||
activity.tryCopyMoveFilesTo(files, isCopyOperation) {
|
||||
config.tempFolderPath = ""
|
||||
listener?.refreshItems()
|
||||
actMode?.finish()
|
||||
}
|
||||
|
@ -240,7 +249,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
|
||||
fun selectAll() {
|
||||
val cnt = dirs.size
|
||||
for (i in 0..cnt - 1) {
|
||||
for (i in 0 until cnt) {
|
||||
selectedPositions.add(i)
|
||||
notifyItemChanged(i)
|
||||
}
|
||||
|
@ -250,7 +259,6 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
private fun askConfirmDelete() {
|
||||
ConfirmationDialog(activity) {
|
||||
deleteFiles()
|
||||
actMode?.finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,15 +292,12 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
listener?.tryDeleteFolders(folders)
|
||||
|
||||
val newItems = SparseArray<View>()
|
||||
var curIndex = 0
|
||||
for (i in 0..itemViews.size() - 1) {
|
||||
if (itemViews[i] != null) {
|
||||
newItems.put(curIndex, itemViews[i])
|
||||
curIndex++
|
||||
}
|
||||
}
|
||||
(0 until itemViews.size())
|
||||
.filter { itemViews[it] != null }
|
||||
.forEachIndexed { curIndex, i -> newItems.put(curIndex, itemViews[i]) }
|
||||
|
||||
itemViews = newItems
|
||||
actMode?.finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,20 +306,30 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
return
|
||||
|
||||
val path = dirs[selectedPositions.first()].path
|
||||
var albumCovers = config.parseAlbumCovers()
|
||||
|
||||
if (useDefault) {
|
||||
albumCovers = albumCovers.filterNot { it.path == path } as ArrayList
|
||||
val albumCovers = getAlbumCoversWithout(path)
|
||||
storeCovers(albumCovers)
|
||||
} else {
|
||||
pickMediumFrom(path, path)
|
||||
}
|
||||
}
|
||||
|
||||
private fun pickMediumFrom(targetFolder: String, path: String) {
|
||||
PickMediumDialog(activity, path) {
|
||||
albumCovers = albumCovers.filterNot { it.path == path } as ArrayList
|
||||
albumCovers.add(AlbumCover(path, it))
|
||||
if (File(it).isDirectory) {
|
||||
pickMediumFrom(targetFolder, it)
|
||||
} else {
|
||||
val albumCovers = getAlbumCoversWithout(path)
|
||||
val cover = AlbumCover(targetFolder, it)
|
||||
albumCovers.add(cover)
|
||||
storeCovers(albumCovers)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getAlbumCoversWithout(path: String) = config.parseAlbumCovers().filterNot { it.path == path } as ArrayList
|
||||
|
||||
private fun storeCovers(albumCovers: ArrayList<AlbumCover>) {
|
||||
activity.config.albumCovers = Gson().toJson(albumCovers)
|
||||
actMode?.finish()
|
||||
|
@ -328,13 +343,14 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent?.context).inflate(R.layout.directory_item, parent, false)
|
||||
val layoutType = if (isListViewType) R.layout.directory_item_list else R.layout.directory_item_grid
|
||||
val view = LayoutInflater.from(parent?.context).inflate(layoutType, parent, false)
|
||||
return ViewHolder(view, adapterListener, activity, multiSelectorMode, multiSelector, listener, isPickIntent, itemClick)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val dir = dirs[position]
|
||||
itemViews.put(position, holder.bindView(dir, pinnedFolders.contains(dir.path), scrollVertically))
|
||||
itemViews.put(position, holder.bindView(dir, pinnedFolders.contains(dir.path), scrollVertically, isListViewType, textColor))
|
||||
toggleItemSelection(selectedPositions.contains(position), position)
|
||||
holder.itemView.tag = holder
|
||||
}
|
||||
|
@ -349,6 +365,12 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
fun updateDirs(newDirs: ArrayList<Directory>) {
|
||||
dirs = newDirs
|
||||
notifyDataSetChanged()
|
||||
actMode?.finish()
|
||||
}
|
||||
|
||||
fun updateTextColor(textColor: Int) {
|
||||
this.textColor = textColor
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun selectItem(pos: Int) {
|
||||
|
@ -367,7 +389,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
toggleItemSelection(true, i)
|
||||
|
||||
if (min > -1 && min < to) {
|
||||
(min..to - 1).filter { it != from }
|
||||
(min until to).filter { it != from }
|
||||
.forEach { toggleItemSelection(false, it) }
|
||||
}
|
||||
if (max > -1) {
|
||||
|
@ -384,7 +406,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
}
|
||||
|
||||
if (min > -1) {
|
||||
for (i in min..from - 1)
|
||||
for (i in min until from)
|
||||
toggleItemSelection(false, i)
|
||||
}
|
||||
}
|
||||
|
@ -393,44 +415,51 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
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)) :
|
||||
SwappingHolder(view, MultiSelector()) {
|
||||
fun bindView(directory: Directory, isPinned: Boolean, scrollVertically: Boolean): View {
|
||||
fun bindView(directory: Directory, isPinned: Boolean, scrollVertically: Boolean, isListView: Boolean, textColor: Int): View {
|
||||
itemView.apply {
|
||||
dir_name.text = directory.name
|
||||
dir_path?.text = "${directory.path.substringBeforeLast("/")}/"
|
||||
photo_cnt.text = directory.mediaCnt.toString()
|
||||
activity.loadImage(directory.tmb, dir_thumbnail, scrollVertically)
|
||||
dir_pin.beVisibleIf(isPinned)
|
||||
dir_sd_card.beVisibleIf(activity.isPathOnSD(directory.path))
|
||||
|
||||
if (isListView) {
|
||||
dir_name.setTextColor(textColor)
|
||||
dir_path.setTextColor(textColor)
|
||||
photo_cnt.setTextColor(textColor)
|
||||
dir_pin.setColorFilter(textColor, PorterDuff.Mode.SRC_IN)
|
||||
dir_sd_card.setColorFilter(textColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
|
||||
setOnClickListener { viewClicked(directory) }
|
||||
setOnLongClickListener { if (isPickIntent) viewClicked(directory) else viewLongClicked(); true }
|
||||
|
||||
|
||||
}
|
||||
return itemView
|
||||
}
|
||||
|
||||
fun viewClicked(directory: Directory) {
|
||||
private fun viewClicked(directory: Directory) {
|
||||
if (multiSelector.isSelectable) {
|
||||
val isSelected = adapterListener.getSelectedPositions().contains(layoutPosition)
|
||||
adapterListener.toggleItemSelectionAdapter(!isSelected, layoutPosition)
|
||||
val isSelected = adapterListener.getSelectedPositions().contains(adapterPosition)
|
||||
adapterListener.toggleItemSelectionAdapter(!isSelected, adapterPosition)
|
||||
} else {
|
||||
itemClick(directory)
|
||||
}
|
||||
}
|
||||
|
||||
fun viewLongClicked() {
|
||||
private fun viewLongClicked() {
|
||||
if (listener != null) {
|
||||
if (!multiSelector.isSelectable) {
|
||||
activity.startSupportActionMode(multiSelectorCallback)
|
||||
adapterListener.toggleItemSelectionAdapter(true, layoutPosition)
|
||||
adapterListener.toggleItemSelectionAdapter(true, adapterPosition)
|
||||
}
|
||||
|
||||
listener.itemLongClicked(layoutPosition)
|
||||
listener.itemLongClicked(adapterPosition)
|
||||
}
|
||||
}
|
||||
|
||||
fun stopLoad() {
|
||||
if (!activity.isDestroyed)
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !activity.isDestroyed)
|
||||
Glide.with(activity).clear(view.dir_thumbnail)
|
||||
}
|
||||
}
|
||||
|
@ -447,5 +476,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
fun tryDeleteFolders(folders: ArrayList<File>)
|
||||
|
||||
fun itemLongClicked(position: Int)
|
||||
|
||||
fun recheckPinnedFolders()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.simplemobiletools.gallery.adapters
|
||||
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Build
|
||||
import android.support.v7.view.ActionMode
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.util.SparseArray
|
||||
|
@ -9,29 +10,33 @@ import com.bignerdranch.android.multiselector.ModalMultiSelectorCallback
|
|||
import com.bignerdranch.android.multiselector.MultiSelector
|
||||
import com.bignerdranch.android.multiselector.SwappingHolder
|
||||
import com.bumptech.glide.Glide
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||
import com.simplemobiletools.commons.dialogs.RenameItemDialog
|
||||
import com.simplemobiletools.commons.extensions.beGone
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||
import com.simplemobiletools.gallery.dialogs.DeleteWithRememberDialog
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_LIST
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
import kotlinx.android.synthetic.main.photo_video_item.view.*
|
||||
import kotlinx.android.synthetic.main.photo_video_item_grid.view.*
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>, val listener: MediaOperationsListener?, val isPickIntent: Boolean,
|
||||
val itemClick: (Medium) -> Unit) : RecyclerView.Adapter<MediaAdapter.ViewHolder>() {
|
||||
val allowMultiplePicks: Boolean, val itemClick: (Medium) -> Unit) : RecyclerView.Adapter<MediaAdapter.ViewHolder>() {
|
||||
|
||||
val multiSelector = MultiSelector()
|
||||
val config = activity.config
|
||||
val isListViewType = config.viewTypeFiles == VIEW_TYPE_LIST
|
||||
var skipConfirmationDialog = false
|
||||
|
||||
var actMode: ActionMode? = null
|
||||
var itemViews = SparseArray<View>()
|
||||
val selectedPositions = HashSet<Int>()
|
||||
var primaryColor = config.primaryColor
|
||||
var textColor = config.textColor
|
||||
var displayFilenames = config.displayFileNames
|
||||
var scrollVertically = !config.scrollHorizontally
|
||||
|
||||
|
@ -39,8 +44,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
if (select) {
|
||||
itemViews[pos]?.medium_check?.background?.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN)
|
||||
selectedPositions.add(pos)
|
||||
} else
|
||||
} else {
|
||||
selectedPositions.remove(pos)
|
||||
}
|
||||
|
||||
itemViews[pos]?.medium_check?.beVisibleIf(select)
|
||||
|
||||
|
@ -52,12 +58,12 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
updateTitle(selectedPositions.size)
|
||||
}
|
||||
|
||||
fun updateTitle(cnt: Int) {
|
||||
private fun updateTitle(cnt: Int) {
|
||||
actMode?.title = "$cnt / ${media.size}"
|
||||
actMode?.invalidate()
|
||||
}
|
||||
|
||||
val adapterListener = object : MyAdapterListener {
|
||||
private val adapterListener = object : MyAdapterListener {
|
||||
override fun toggleItemSelectionAdapter(select: Boolean, position: Int) {
|
||||
toggleItemSelection(select, position)
|
||||
}
|
||||
|
@ -65,9 +71,10 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
override fun getSelectedPositions(): HashSet<Int> = selectedPositions
|
||||
}
|
||||
|
||||
val multiSelectorMode = object : ModalMultiSelectorCallback(multiSelector) {
|
||||
private val multiSelectorMode = object : ModalMultiSelectorCallback(multiSelector) {
|
||||
override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.cab_confirm_selection -> confirmSelection()
|
||||
R.id.cab_properties -> showProperties()
|
||||
R.id.cab_rename -> renameFile()
|
||||
R.id.cab_edit -> editFile()
|
||||
|
@ -77,7 +84,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
R.id.cab_copy_to -> copyMoveTo(true)
|
||||
R.id.cab_move_to -> copyMoveTo(false)
|
||||
R.id.cab_select_all -> selectAll()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_delete -> checkDeleteConfirmation()
|
||||
else -> return false
|
||||
}
|
||||
return true
|
||||
|
@ -93,6 +100,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu): Boolean {
|
||||
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_confirm_selection).isVisible = isPickIntent && allowMultiplePicks && selectedPositions.size > 0
|
||||
|
||||
checkHideBtnVisibility(menu)
|
||||
|
||||
|
@ -111,18 +119,24 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
fun checkHideBtnVisibility(menu: Menu) {
|
||||
var hiddenCnt = 0
|
||||
var unhiddenCnt = 0
|
||||
selectedPositions.map { media.getOrNull(it) }.filterNotNull().forEach {
|
||||
if (it.name.startsWith('.'))
|
||||
selectedPositions.mapNotNull { media.getOrNull(it) }.forEach {
|
||||
if (it.name.startsWith('.')) {
|
||||
hiddenCnt++
|
||||
else
|
||||
} else {
|
||||
unhiddenCnt++
|
||||
}
|
||||
}
|
||||
|
||||
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
||||
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
||||
}
|
||||
}
|
||||
|
||||
private fun confirmSelection() {
|
||||
val paths = getSelectedMedia().map { it.path } as ArrayList<String>
|
||||
listener?.selectedPaths(paths)
|
||||
}
|
||||
|
||||
private fun showProperties() {
|
||||
if (selectedPositions.size <= 1) {
|
||||
PropertiesDialog(activity, media[selectedPositions.first()].path, config.shouldShowHidden)
|
||||
|
@ -161,9 +175,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
}
|
||||
|
||||
private fun shareMedia() {
|
||||
if (selectedPositions.size <= 1) {
|
||||
if (selectedPositions.size == 1 && selectedPositions.first() != -1) {
|
||||
activity.shareMedium(getSelectedMedia()[0])
|
||||
} else {
|
||||
} else if (selectedPositions.size > 1) {
|
||||
activity.shareMedia(getSelectedMedia())
|
||||
}
|
||||
}
|
||||
|
@ -173,6 +187,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
selectedPositions.forEach { files.add(File(media[it].path)) }
|
||||
|
||||
activity.tryCopyMoveFilesTo(files, isCopyOperation) {
|
||||
config.tempFolderPath = ""
|
||||
if (!isCopyOperation) {
|
||||
listener?.refreshItems()
|
||||
}
|
||||
|
@ -182,7 +197,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
|
||||
fun selectAll() {
|
||||
val cnt = media.size
|
||||
for (i in 0..cnt - 1) {
|
||||
for (i in 0 until cnt) {
|
||||
selectedPositions.add(i)
|
||||
multiSelector.setSelected(i, 0, true)
|
||||
notifyItemChanged(i)
|
||||
|
@ -190,18 +205,31 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
updateTitle(cnt)
|
||||
}
|
||||
|
||||
private fun askConfirmDelete() {
|
||||
ConfirmationDialog(activity) {
|
||||
deleteFiles()
|
||||
actMode?.finish()
|
||||
private fun checkDeleteConfirmation() {
|
||||
if (skipConfirmationDialog) {
|
||||
deleteConfirmed()
|
||||
} else {
|
||||
askConfirmDelete()
|
||||
}
|
||||
}
|
||||
|
||||
private fun askConfirmDelete() {
|
||||
DeleteWithRememberDialog(activity) {
|
||||
skipConfirmationDialog = it
|
||||
deleteConfirmed()
|
||||
}
|
||||
}
|
||||
|
||||
private fun deleteConfirmed() {
|
||||
deleteFiles()
|
||||
}
|
||||
|
||||
private fun getCurrentFile() = File(media[selectedPositions.first()].path)
|
||||
|
||||
private fun deleteFiles() {
|
||||
if (selectedPositions.isEmpty())
|
||||
if (selectedPositions.isEmpty()) {
|
||||
return
|
||||
}
|
||||
|
||||
val files = ArrayList<File>(selectedPositions.size)
|
||||
val removeMedia = ArrayList<Medium>(selectedPositions.size)
|
||||
|
@ -225,15 +253,12 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
listener?.deleteFiles(files)
|
||||
|
||||
val newItems = SparseArray<View>()
|
||||
var curIndex = 0
|
||||
for (i in 0..itemViews.size() - 1) {
|
||||
if (itemViews[i] != null) {
|
||||
newItems.put(curIndex, itemViews[i])
|
||||
curIndex++
|
||||
}
|
||||
}
|
||||
(0 until itemViews.size())
|
||||
.filter { itemViews[it] != null }
|
||||
.forEachIndexed { curIndex, i -> newItems.put(curIndex, itemViews[i]) }
|
||||
|
||||
itemViews = newItems
|
||||
actMode?.finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,12 +269,13 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent?.context).inflate(R.layout.photo_video_item, parent, false)
|
||||
return ViewHolder(view, adapterListener, activity, multiSelectorMode, multiSelector, listener, isPickIntent, itemClick)
|
||||
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)
|
||||
return ViewHolder(view, adapterListener, activity, multiSelectorMode, multiSelector, listener, allowMultiplePicks || !isPickIntent, itemClick)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
itemViews.put(position, holder.bindView(media[position], displayFilenames, scrollVertically))
|
||||
itemViews.put(position, holder.bindView(media[position], displayFilenames, scrollVertically, isListViewType, textColor))
|
||||
toggleItemSelection(selectedPositions.contains(position), position)
|
||||
holder.itemView.tag = holder
|
||||
}
|
||||
|
@ -264,6 +290,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
fun updateMedia(newMedia: ArrayList<Medium>) {
|
||||
media = newMedia
|
||||
notifyDataSetChanged()
|
||||
actMode?.finish()
|
||||
}
|
||||
|
||||
fun updateDisplayFilenames(display: Boolean) {
|
||||
|
@ -271,6 +298,11 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun updateTextColor(textColor: Int) {
|
||||
this.textColor = textColor
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun selectItem(pos: Int) {
|
||||
toggleItemSelection(true, pos)
|
||||
}
|
||||
|
@ -287,7 +319,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
toggleItemSelection(true, i)
|
||||
|
||||
if (min > -1 && min < to) {
|
||||
(min..to - 1).filter { it != from }
|
||||
(min until to).filter { it != from }
|
||||
.forEach { toggleItemSelection(false, it) }
|
||||
}
|
||||
if (max > -1) {
|
||||
|
@ -304,50 +336,56 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
}
|
||||
|
||||
if (min > -1) {
|
||||
for (i in min..from - 1)
|
||||
for (i in min until from)
|
||||
toggleItemSelection(false, i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ViewHolder(val view: View, val adapterListener: MyAdapterListener, val activity: SimpleActivity, val multiSelectorCallback: ModalMultiSelectorCallback,
|
||||
val multiSelector: MultiSelector, val listener: MediaOperationsListener?, val isPickIntent: Boolean, val itemClick: (Medium) -> (Unit)) :
|
||||
val multiSelector: MultiSelector, val listener: MediaOperationsListener?, val allowMultiplePicks: Boolean,
|
||||
val itemClick: (Medium) -> (Unit)) :
|
||||
SwappingHolder(view, MultiSelector()) {
|
||||
fun bindView(medium: Medium, displayFilenames: Boolean, scrollVertically: Boolean): View {
|
||||
fun bindView(medium: Medium, displayFilenames: Boolean, scrollVertically: Boolean, isListViewType: Boolean, textColor: Int): View {
|
||||
itemView.apply {
|
||||
play_outline.visibility = if (medium.video) View.VISIBLE else View.GONE
|
||||
photo_name.beVisibleIf(displayFilenames)
|
||||
photo_name.beVisibleIf(displayFilenames || isListViewType)
|
||||
photo_name.text = medium.name
|
||||
activity.loadImage(medium.path, medium_thumbnail, scrollVertically)
|
||||
|
||||
if (isListViewType) {
|
||||
photo_name.setTextColor(textColor)
|
||||
play_outline.setColorFilter(textColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
|
||||
setOnClickListener { viewClicked(medium) }
|
||||
setOnLongClickListener { if (isPickIntent) viewClicked(medium) else viewLongClicked(); true }
|
||||
setOnLongClickListener { if (allowMultiplePicks) viewLongClicked() else viewClicked(medium); true }
|
||||
}
|
||||
return itemView
|
||||
}
|
||||
|
||||
fun viewClicked(medium: Medium) {
|
||||
private fun viewClicked(medium: Medium) {
|
||||
if (multiSelector.isSelectable) {
|
||||
val isSelected = adapterListener.getSelectedPositions().contains(layoutPosition)
|
||||
adapterListener.toggleItemSelectionAdapter(!isSelected, layoutPosition)
|
||||
val isSelected = adapterListener.getSelectedPositions().contains(adapterPosition)
|
||||
adapterListener.toggleItemSelectionAdapter(!isSelected, adapterPosition)
|
||||
} else {
|
||||
itemClick(medium)
|
||||
}
|
||||
}
|
||||
|
||||
fun viewLongClicked() {
|
||||
private fun viewLongClicked() {
|
||||
if (listener != null) {
|
||||
if (!multiSelector.isSelectable) {
|
||||
activity.startSupportActionMode(multiSelectorCallback)
|
||||
adapterListener.toggleItemSelectionAdapter(true, layoutPosition)
|
||||
adapterListener.toggleItemSelectionAdapter(true, adapterPosition)
|
||||
}
|
||||
|
||||
listener.itemLongClicked(layoutPosition)
|
||||
listener.itemLongClicked(adapterPosition)
|
||||
}
|
||||
}
|
||||
|
||||
fun stopLoad() {
|
||||
if (!activity.isDestroyed)
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !activity.isDestroyed)
|
||||
Glide.with(activity).clear(view.medium_thumbnail)
|
||||
}
|
||||
}
|
||||
|
@ -364,5 +402,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
fun deleteFiles(files: ArrayList<File>)
|
||||
|
||||
fun itemLongClicked(position: Int)
|
||||
|
||||
fun selectedPaths(paths: ArrayList<String>)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,126 +3,74 @@ package com.simplemobiletools.gallery.asynctasks
|
|||
import android.content.Context
|
||||
import android.os.AsyncTask
|
||||
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.sdCardPath
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||
import com.simplemobiletools.commons.helpers.SORT_DESCENDING
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.extensions.containsNoMedia
|
||||
import com.simplemobiletools.gallery.extensions.getFilesFrom
|
||||
import com.simplemobiletools.gallery.extensions.sumByLong
|
||||
import com.simplemobiletools.gallery.helpers.MediaFetcher
|
||||
import com.simplemobiletools.gallery.models.Directory
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, val isPickImage: Boolean,
|
||||
val callback: (dirs: ArrayList<Directory>) -> Unit) : AsyncTask<Void, Void, ArrayList<Directory>>() {
|
||||
var config = context.config
|
||||
var shouldStop = false
|
||||
val showHidden = config.shouldShowHidden
|
||||
val mediaFetcher = MediaFetcher(context)
|
||||
|
||||
override fun doInBackground(vararg params: Void): ArrayList<Directory> {
|
||||
if (!context.hasWriteStoragePermission())
|
||||
if (!context.hasPermission(PERMISSION_WRITE_STORAGE))
|
||||
return ArrayList()
|
||||
|
||||
val media = context.getFilesFrom("", isPickImage, isPickVideo)
|
||||
val excludedPaths = config.excludedFolders
|
||||
val includedPaths = config.includedFolders
|
||||
val directories = groupDirectories(media)
|
||||
val dirs = ArrayList(directories.values
|
||||
.filter { File(it.path).exists() })
|
||||
.filter { shouldFolderBeVisible(it.path, excludedPaths, includedPaths) } as ArrayList<Directory>
|
||||
Directory.sorting = config.directorySorting
|
||||
dirs.sort()
|
||||
return movePinnedToFront(dirs)
|
||||
}
|
||||
|
||||
private fun groupDirectories(media: ArrayList<Medium>): Map<String, Directory> {
|
||||
val albumCovers = config.parseAlbumCovers()
|
||||
val config = context.config
|
||||
val groupedMedia = mediaFetcher.getMediaByDirectories(isPickVideo, isPickImage)
|
||||
val directories = ArrayList<Directory>()
|
||||
val hidden = context.resources.getString(R.string.hidden)
|
||||
val directories = LinkedHashMap<String, Directory>()
|
||||
for ((name, path, isVideo, dateModified, dateTaken, size) in media) {
|
||||
if (shouldStop)
|
||||
cancel(true)
|
||||
val albumCovers = config.parseAlbumCovers()
|
||||
for ((path, curMedia) in groupedMedia) {
|
||||
Medium.sorting = config.getFileSorting(path)
|
||||
curMedia.sort()
|
||||
|
||||
val parentDir = File(path).parent ?: continue
|
||||
if (directories.containsKey(parentDir.toLowerCase())) {
|
||||
val directory = directories[parentDir.toLowerCase()]!!
|
||||
val newImageCnt = directory.mediaCnt + 1
|
||||
directory.mediaCnt = newImageCnt
|
||||
directory.addSize(size)
|
||||
} else {
|
||||
var dirName = parentDir.getFilenameFromPath()
|
||||
if (parentDir == context.internalStoragePath) {
|
||||
dirName = context.getString(R.string.internal)
|
||||
} else if (parentDir == context.sdCardPath) {
|
||||
dirName = context.getString(R.string.sd_card)
|
||||
}
|
||||
|
||||
if (File(parentDir).containsNoMedia()) {
|
||||
dirName += " $hidden"
|
||||
|
||||
if (!showHidden)
|
||||
continue
|
||||
}
|
||||
|
||||
var thumbnail = path
|
||||
val firstItem = curMedia.first()
|
||||
val lastItem = curMedia.last()
|
||||
val parentDir = File(firstItem.path).parent
|
||||
var thumbnail = firstItem.path
|
||||
albumCovers.forEach {
|
||||
if (it.path == parentDir && File(it.tmb).exists()) {
|
||||
thumbnail = it.tmb
|
||||
}
|
||||
}
|
||||
|
||||
val directory = Directory(parentDir, thumbnail, dirName, 1, dateModified, dateTaken, size)
|
||||
directories.put(parentDir.toLowerCase(), directory)
|
||||
var dirName = when (parentDir) {
|
||||
context.internalStoragePath -> context.getString(R.string.internal)
|
||||
context.sdCardPath -> context.getString(R.string.sd_card)
|
||||
else -> parentDir.getFilenameFromPath()
|
||||
}
|
||||
|
||||
if (File(parentDir).containsNoMedia()) {
|
||||
dirName += " $hidden"
|
||||
}
|
||||
|
||||
val lastModified = if (config.directorySorting and SORT_DESCENDING > 0) Math.max(firstItem.modified, lastItem.modified) else Math.min(firstItem.modified, lastItem.modified)
|
||||
val dateTaken = if (config.directorySorting and SORT_DESCENDING > 0) Math.max(firstItem.taken, lastItem.taken) else Math.min(firstItem.taken, lastItem.taken)
|
||||
val size = curMedia.sumByLong { it.size }
|
||||
val directory = Directory(parentDir, thumbnail, dirName, curMedia.size, lastModified, dateTaken, size)
|
||||
directories.add(directory)
|
||||
}
|
||||
|
||||
return directories
|
||||
}
|
||||
|
||||
private fun shouldFolderBeVisible(path: String, excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>): Boolean {
|
||||
val file = File(path)
|
||||
return if (isThisOrParentExcluded(path, excludedPaths, includedPaths)) {
|
||||
false
|
||||
} else if (!config.shouldShowHidden && file.isDirectory && file.canonicalFile == file.absoluteFile) {
|
||||
var containsNoMediaOrDot = file.containsNoMedia() || path.contains("/.")
|
||||
if (!containsNoMediaOrDot) {
|
||||
containsNoMediaOrDot = checkParentHasNoMedia(file.parentFile)
|
||||
}
|
||||
!containsNoMediaOrDot
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkParentHasNoMedia(file: File): Boolean {
|
||||
var curFile = file
|
||||
while (true) {
|
||||
if (curFile.containsNoMedia()) {
|
||||
return true
|
||||
}
|
||||
curFile = curFile.parentFile
|
||||
if (curFile.absolutePath == "/")
|
||||
break
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
private fun isThisOrParentExcluded(path: String, excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>) =
|
||||
includedPaths.none { path.startsWith(it) } && excludedPaths.any { path.startsWith(it) }
|
||||
|
||||
private fun movePinnedToFront(dirs: ArrayList<Directory>): ArrayList<Directory> {
|
||||
val foundFolders = ArrayList<Directory>()
|
||||
val pinnedFolders = config.pinnedFolders
|
||||
|
||||
dirs.forEach { if (pinnedFolders.contains(it.path)) foundFolders.add(it) }
|
||||
dirs.removeAll(foundFolders)
|
||||
dirs.addAll(0, foundFolders)
|
||||
return dirs
|
||||
}
|
||||
|
||||
override fun onPostExecute(dirs: ArrayList<Directory>) {
|
||||
super.onPostExecute(dirs)
|
||||
callback.invoke(dirs)
|
||||
callback(dirs)
|
||||
}
|
||||
|
||||
fun stopFetching() {
|
||||
mediaFetcher.shouldStop = true
|
||||
cancel(true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,21 +2,40 @@ package com.simplemobiletools.gallery.asynctasks
|
|||
|
||||
import android.content.Context
|
||||
import android.os.AsyncTask
|
||||
import com.simplemobiletools.gallery.extensions.getFilesFrom
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.helpers.MediaFetcher
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
import java.util.*
|
||||
|
||||
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) :
|
||||
AsyncTask<Void, Void, ArrayList<Medium>>() {
|
||||
private val mediaFetcher = MediaFetcher(context)
|
||||
|
||||
override fun doInBackground(vararg params: Void): ArrayList<Medium> {
|
||||
val path = if (showAll) "" else mPath
|
||||
return context.getFilesFrom(path, isPickImage, isPickVideo)
|
||||
return if (showAll) {
|
||||
val mediaMap = mediaFetcher.getMediaByDirectories(isPickVideo, isPickImage)
|
||||
val media = ArrayList<Medium>()
|
||||
|
||||
mediaMap.values.forEach {
|
||||
media.addAll(it)
|
||||
}
|
||||
|
||||
Medium.sorting = context.config.getFileSorting("")
|
||||
media.sort()
|
||||
media
|
||||
} else {
|
||||
mediaFetcher.getFilesFrom(mPath, isPickImage, isPickVideo)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPostExecute(media: ArrayList<Medium>) {
|
||||
super.onPostExecute(media)
|
||||
callback.invoke(media)
|
||||
callback(media)
|
||||
}
|
||||
|
||||
fun stopFetching() {
|
||||
mediaFetcher.shouldStop = true
|
||||
cancel(true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,12 +42,12 @@ class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting:
|
|||
val sortingRadio = view.sorting_dialog_radio_sorting
|
||||
var sortBtn = sortingRadio.sorting_dialog_radio_name
|
||||
|
||||
if (currSorting and SORT_BY_SIZE != 0) {
|
||||
sortBtn = sortingRadio.sorting_dialog_radio_size
|
||||
} else if (currSorting and SORT_BY_DATE_MODIFIED != 0) {
|
||||
sortBtn = sortingRadio.sorting_dialog_radio_last_modified
|
||||
} else if (currSorting and SORT_BY_DATE_TAKEN != 0)
|
||||
sortBtn = sortingRadio.sorting_dialog_radio_date_taken
|
||||
when {
|
||||
currSorting and SORT_BY_PATH != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_path
|
||||
currSorting and SORT_BY_SIZE != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_size
|
||||
currSorting and SORT_BY_DATE_MODIFIED != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_last_modified
|
||||
currSorting and SORT_BY_DATE_TAKEN != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_date_taken
|
||||
}
|
||||
sortBtn.isChecked = true
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,7 @@ class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting:
|
|||
val sortingRadio = view.sorting_dialog_radio_sorting
|
||||
var sorting = when (sortingRadio.checkedRadioButtonId) {
|
||||
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_last_modified -> SORT_BY_DATE_MODIFIED
|
||||
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,46 @@
|
|||
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.GIFS
|
||||
import com.simplemobiletools.gallery.helpers.IMAGES
|
||||
import com.simplemobiletools.gallery.helpers.VIDEOS
|
||||
import kotlinx.android.synthetic.main.dialog_filter_media.view.*
|
||||
|
||||
class FilterMediaDialog(val activity: SimpleActivity, val callback: (result: Int) -> Unit) {
|
||||
private var view: View = LayoutInflater.from(activity).inflate(R.layout.dialog_filter_media, null)
|
||||
|
||||
init {
|
||||
val filterMedia = activity.config.filterMedia
|
||||
view.apply {
|
||||
filter_media_images.isChecked = filterMedia and IMAGES != 0
|
||||
filter_media_videos.isChecked = filterMedia and VIDEOS != 0
|
||||
filter_media_gifs.isChecked = filterMedia and GIFS != 0
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this, R.string.filter_media)
|
||||
}
|
||||
}
|
||||
|
||||
private fun dialogConfirmed() {
|
||||
var result = 0
|
||||
if (view.filter_media_images.isChecked)
|
||||
result += IMAGES
|
||||
if (view.filter_media_videos.isChecked)
|
||||
result += VIDEOS
|
||||
if (view.filter_media_gifs.isChecked)
|
||||
result += GIFS
|
||||
|
||||
activity.config.filterMedia = result
|
||||
callback(result)
|
||||
}
|
||||
}
|
|
@ -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.widget.GridLayoutManager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||
import com.simplemobiletools.commons.extensions.beGoneIf
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
|
@ -15,18 +14,21 @@ import com.simplemobiletools.gallery.adapters.DirectoryAdapter
|
|||
import com.simplemobiletools.gallery.asynctasks.GetDirectoriesAsynctask
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.extensions.getCachedDirectories
|
||||
import com.simplemobiletools.gallery.extensions.getSortedDirectories
|
||||
import com.simplemobiletools.gallery.helpers.VIEW_TYPE_GRID
|
||||
import com.simplemobiletools.gallery.models.Directory
|
||||
import kotlinx.android.synthetic.main.dialog_directory_picker.view.*
|
||||
|
||||
class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String, val callback: (path: String) -> Unit) {
|
||||
var dialog: AlertDialog
|
||||
var shownDirectories: ArrayList<Directory> = ArrayList()
|
||||
var view: View = LayoutInflater.from(activity).inflate(R.layout.dialog_directory_picker, null)
|
||||
var shownDirectories = ArrayList<Directory>()
|
||||
var view = LayoutInflater.from(activity).inflate(R.layout.dialog_directory_picker, null)
|
||||
var isGridViewType = activity.config.viewTypeFolders == VIEW_TYPE_GRID
|
||||
|
||||
init {
|
||||
(view.directories_grid.layoutManager as GridLayoutManager).apply {
|
||||
orientation = if (activity.config.scrollHorizontally) GridLayoutManager.HORIZONTAL else GridLayoutManager.VERTICAL
|
||||
spanCount = activity.config.dirColumnCnt
|
||||
orientation = if (activity.config.scrollHorizontally && isGridViewType) GridLayoutManager.HORIZONTAL else GridLayoutManager.VERTICAL
|
||||
spanCount = if (isGridViewType) activity.config.dirColumnCnt else 1
|
||||
}
|
||||
|
||||
dialog = AlertDialog.Builder(activity)
|
||||
|
@ -35,31 +37,32 @@ class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String,
|
|||
.setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() })
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this, R.string.select_destination)
|
||||
}
|
||||
|
||||
val dirs = activity.getCachedDirectories()
|
||||
if (dirs.isNotEmpty()) {
|
||||
gotDirectories(dirs)
|
||||
gotDirectories(activity.addTempFolderIfNeeded(dirs))
|
||||
}
|
||||
|
||||
GetDirectoriesAsynctask(activity, false, false) {
|
||||
gotDirectories(it)
|
||||
gotDirectories(activity.addTempFolderIfNeeded(it))
|
||||
}.execute()
|
||||
}
|
||||
}
|
||||
|
||||
fun showOtherFolder() {
|
||||
private fun showOtherFolder() {
|
||||
val showHidden = activity.config.shouldShowHidden
|
||||
FilePickerDialog(activity, sourcePath, false, showHidden, true) {
|
||||
callback(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun gotDirectories(directories: ArrayList<Directory>) {
|
||||
if (directories.hashCode() == shownDirectories.hashCode())
|
||||
private fun gotDirectories(newDirs: ArrayList<Directory>) {
|
||||
val dirs = activity.getSortedDirectories(newDirs)
|
||||
if (dirs.hashCode() == shownDirectories.hashCode())
|
||||
return
|
||||
|
||||
shownDirectories = directories
|
||||
val adapter = DirectoryAdapter(activity, directories, null, true) {
|
||||
shownDirectories = dirs
|
||||
val adapter = DirectoryAdapter(activity, dirs, null, true) {
|
||||
if (it.path.trimEnd('/') == sourcePath) {
|
||||
activity.toast(R.string.source_and_destination_same)
|
||||
return@DirectoryAdapter
|
||||
|
@ -69,7 +72,7 @@ class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String,
|
|||
}
|
||||
}
|
||||
|
||||
val scrollHorizontally = activity.config.scrollHorizontally
|
||||
val scrollHorizontally = activity.config.scrollHorizontally && isGridViewType
|
||||
view.apply {
|
||||
directories_grid.adapter = adapter
|
||||
|
||||
|
|
|
@ -1,37 +1,42 @@
|
|||
package com.simplemobiletools.gallery.dialogs
|
||||
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.support.v7.widget.GridLayoutManager
|
||||
import android.view.LayoutInflater
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.simplemobiletools.commons.extensions.beGoneIf
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||
import com.simplemobiletools.gallery.adapters.MediaAdapter
|
||||
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
||||
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 kotlinx.android.synthetic.main.dialog_medium_picker.view.*
|
||||
|
||||
class PickMediumDialog(val activity: SimpleActivity, val path: String, val callback: (path: String) -> Unit) {
|
||||
var dialog: AlertDialog
|
||||
var mediaGrid: RecyclerView
|
||||
var shownMedia: ArrayList<Medium> = ArrayList()
|
||||
var shownMedia = ArrayList<Medium>()
|
||||
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_medium_picker, null)
|
||||
var isGridViewType = activity.config.viewTypeFiles == VIEW_TYPE_GRID
|
||||
|
||||
init {
|
||||
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_medium_picker, null)
|
||||
mediaGrid = view.media_grid
|
||||
(view.media_grid.layoutManager as GridLayoutManager).apply {
|
||||
orientation = if (activity.config.scrollHorizontally && isGridViewType) GridLayoutManager.HORIZONTAL else GridLayoutManager.VERTICAL
|
||||
spanCount = if (isGridViewType) activity.config.mediaColumnCnt else 1
|
||||
}
|
||||
|
||||
dialog = AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() })
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this, R.string.select_photo)
|
||||
}
|
||||
|
||||
val token = object : TypeToken<List<Medium>>() {}.type
|
||||
val media = Gson().fromJson<ArrayList<Medium>>(activity.config.loadFolderMedia(path), token) ?: ArrayList<Medium>(1)
|
||||
|
||||
val media = activity.getCachedMedia(path).filter { !it.video } as ArrayList
|
||||
if (media.isNotEmpty()) {
|
||||
gotMedia(media)
|
||||
}
|
||||
|
@ -40,6 +45,12 @@ class PickMediumDialog(val activity: SimpleActivity, val path: String, val callb
|
|||
gotMedia(it)
|
||||
}.execute()
|
||||
}
|
||||
|
||||
private fun showOtherFolder() {
|
||||
PickDirectoryDialog(activity, path) {
|
||||
callback(it)
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
private fun gotMedia(media: ArrayList<Medium>) {
|
||||
|
@ -47,10 +58,26 @@ class PickMediumDialog(val activity: SimpleActivity, val path: String, val callb
|
|||
return
|
||||
|
||||
shownMedia = media
|
||||
val adapter = MediaAdapter(activity, media, null, true) {
|
||||
val adapter = MediaAdapter(activity, media, null, true, false) {
|
||||
callback(it.path)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,15 +6,14 @@ import android.view.View
|
|||
import android.view.WindowManager
|
||||
import com.simplemobiletools.commons.extensions.hideKeyboard
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.helpers.SLIDESHOW_DEFAULT_INTERVAL
|
||||
import kotlinx.android.synthetic.main.dialog_slideshow.view.*
|
||||
|
||||
|
||||
class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
||||
val dialog: AlertDialog
|
||||
val view: View
|
||||
|
||||
init {
|
||||
|
@ -42,6 +41,11 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
|||
include_videos.toggle()
|
||||
}
|
||||
|
||||
include_gifs_holder.setOnClickListener {
|
||||
interval_value.clearFocus()
|
||||
include_gifs.toggle()
|
||||
}
|
||||
|
||||
random_order_holder.setOnClickListener {
|
||||
interval_value.clearFocus()
|
||||
random_order.toggle()
|
||||
|
@ -56,15 +60,30 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
|||
interval_value.clearFocus()
|
||||
move_backwards.toggle()
|
||||
}
|
||||
|
||||
loop_slideshow_holder.setOnClickListener {
|
||||
interval_value.clearFocus()
|
||||
loop_slideshow.toggle()
|
||||
}
|
||||
}
|
||||
setupValues()
|
||||
|
||||
dialog = AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
||||
AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||
activity.setupDialogStuff(view, this)
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({
|
||||
if (!view.include_photos.isChecked && !view.include_videos.isChecked && !view.include_gifs.isChecked) {
|
||||
activity.toast(R.string.no_media_for_slideshow)
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
storeValues()
|
||||
callback()
|
||||
dismiss()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,13 +93,15 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
|||
interval_value.setText(config.slideshowInterval.toString())
|
||||
include_photos.isChecked = config.slideshowIncludePhotos
|
||||
include_videos.isChecked = config.slideshowIncludeVideos
|
||||
include_gifs.isChecked = config.slideshowIncludeGIFs
|
||||
random_order.isChecked = config.slideshowRandomOrder
|
||||
use_fade.isChecked = config.slideshowUseFade
|
||||
move_backwards.isChecked = config.slideshowMoveBackwards
|
||||
loop_slideshow.isChecked = config.loopSlideshow
|
||||
}
|
||||
}
|
||||
|
||||
private fun dialogConfirmed() {
|
||||
private fun storeValues() {
|
||||
var interval = view.interval_value.text.toString()
|
||||
if (interval.trim('0').isEmpty())
|
||||
interval = SLIDESHOW_DEFAULT_INTERVAL.toString()
|
||||
|
@ -89,11 +110,11 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
|||
slideshowInterval = interval.toInt()
|
||||
slideshowIncludePhotos = view.include_photos.isChecked
|
||||
slideshowIncludeVideos = view.include_videos.isChecked
|
||||
slideshowIncludeGIFs = view.include_gifs.isChecked
|
||||
slideshowRandomOrder = view.random_order.isChecked
|
||||
slideshowUseFade = view.use_fade.isChecked
|
||||
slideshowMoveBackwards = view.move_backwards.isChecked
|
||||
}
|
||||
dialog.dismiss()
|
||||
callback()
|
||||
loopSlideshow = view.loop_slideshow.isChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import com.simplemobiletools.commons.helpers.*
|
|||
import com.simplemobiletools.gallery.BuildConfig
|
||||
import com.simplemobiletools.gallery.R
|
||||
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.REQUEST_EDIT_IMAGE
|
||||
import com.simplemobiletools.gallery.helpers.REQUEST_SET_AS
|
||||
|
@ -48,6 +49,7 @@ fun Activity.shareMedium(medium: Medium) {
|
|||
val shareTitle = resources.getString(R.string.share_via)
|
||||
val file = File(medium.path)
|
||||
val uri = Uri.fromFile(file)
|
||||
|
||||
Intent().apply {
|
||||
action = Intent.ACTION_SEND
|
||||
putExtra(Intent.EXTRA_STREAM, uri)
|
||||
|
@ -59,14 +61,12 @@ fun Activity.shareMedium(medium: Medium) {
|
|||
|
||||
fun Activity.shareMedia(media: List<Medium>) {
|
||||
val shareTitle = resources.getString(R.string.share_via)
|
||||
val uris = ArrayList<Uri>(media.size)
|
||||
val uris = media.map { Uri.fromFile(File(it.path)) } as ArrayList
|
||||
|
||||
Intent().apply {
|
||||
action = Intent.ACTION_SEND_MULTIPLE
|
||||
type = "image/* video/*"
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
media.map { File(it.path) }
|
||||
.mapTo(uris) { Uri.fromFile(it) }
|
||||
|
||||
putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris)
|
||||
startActivity(Intent.createChooser(this, shareTitle))
|
||||
}
|
||||
|
@ -92,14 +92,14 @@ fun Activity.setAs(uri: Uri, file: File, showToast: Boolean = true): Boolean {
|
|||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
val chooser = Intent.createChooser(this, getString(R.string.set_as))
|
||||
|
||||
if (resolveActivity(packageManager) != null) {
|
||||
success = if (resolveActivity(packageManager) != null) {
|
||||
startActivityForResult(chooser, REQUEST_SET_AS)
|
||||
success = true
|
||||
true
|
||||
} else {
|
||||
if (showToast) {
|
||||
toast(R.string.no_capable_app_found)
|
||||
}
|
||||
success = false
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,7 @@ fun Activity.openWith(file: File, forceChooser: Boolean = true) {
|
|||
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))
|
||||
|
@ -223,9 +224,10 @@ fun SimpleActivity.addNoMedia(path: String, callback: () -> Unit) {
|
|||
|
||||
if (needsStupidWritePermissions(path)) {
|
||||
handleSAFDialog(file) {
|
||||
try {
|
||||
getFileDocument(path)?.createFile("", NOMEDIA)
|
||||
} catch (e: Exception) {
|
||||
val fileDocument = getFileDocument(path)
|
||||
if (fileDocument?.exists() == true && fileDocument.isDirectory) {
|
||||
fileDocument.createFile("", NOMEDIA)
|
||||
} else {
|
||||
toast(R.string.unknown_error_occurred)
|
||||
}
|
||||
}
|
||||
|
@ -233,9 +235,10 @@ fun SimpleActivity.addNoMedia(path: String, callback: () -> Unit) {
|
|||
try {
|
||||
file.createNewFile()
|
||||
} catch (e: Exception) {
|
||||
toast(R.string.unknown_error_occurred)
|
||||
showErrorToast(e)
|
||||
}
|
||||
}
|
||||
|
||||
scanFile(file) {
|
||||
callback()
|
||||
}
|
||||
|
@ -251,10 +254,10 @@ fun SimpleActivity.removeNoMedia(path: String, callback: () -> Unit) {
|
|||
fun SimpleActivity.toggleFileVisibility(oldFile: File, hide: Boolean, callback: (newFile: File) -> Unit) {
|
||||
val path = oldFile.parent
|
||||
var filename = oldFile.name
|
||||
if (hide) {
|
||||
filename = ".${filename.trimStart('.')}"
|
||||
filename = if (hide) {
|
||||
".${filename.trimStart('.')}"
|
||||
} else {
|
||||
filename = filename.substring(1, filename.length)
|
||||
filename.substring(1, filename.length)
|
||||
}
|
||||
val newFile = File(path, filename)
|
||||
renameFile(oldFile, newFile) {
|
||||
|
@ -336,3 +339,8 @@ fun Activity.getCachedDirectories(): ArrayList<Directory> {
|
|||
val token = object : TypeToken<List<Directory>>() {}.type
|
||||
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)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package com.simplemobiletools.gallery.extensions
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun <E> ArrayList<E>.sumByLong(selector: (E) -> Long) = map { selector(it) }.sum()
|
|
@ -4,25 +4,45 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.database.Cursor
|
||||
import android.graphics.Point
|
||||
import android.media.AudioManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.provider.MediaStore
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_NAME
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_SIZE
|
||||
import com.simplemobiletools.commons.helpers.SORT_DESCENDING
|
||||
import android.view.WindowManager
|
||||
import com.simplemobiletools.commons.extensions.humanizePath
|
||||
import com.simplemobiletools.gallery.activities.SettingsActivity
|
||||
import com.simplemobiletools.gallery.helpers.Config
|
||||
import com.simplemobiletools.gallery.helpers.IMAGES
|
||||
import com.simplemobiletools.gallery.helpers.NOMEDIA
|
||||
import com.simplemobiletools.gallery.helpers.VIDEOS
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
import com.simplemobiletools.gallery.models.Directory
|
||||
|
||||
val Context.portrait get() = resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT
|
||||
val Context.audioManager get() = getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
val Context.windowManager: WindowManager get() = getSystemService(Context.WINDOW_SERVICE) as WindowManager
|
||||
val Context.navigationBarRight: Boolean get() = usableScreenSize.x < realScreenSize.x
|
||||
val Context.navigationBarBottom: Boolean get() = usableScreenSize.y < realScreenSize.y
|
||||
val Context.navigationBarHeight: Int get() = if (navigationBarBottom) navigationBarSize.y else 0
|
||||
|
||||
internal val Context.navigationBarSize: Point
|
||||
get() = when {
|
||||
navigationBarRight -> Point(realScreenSize.x - usableScreenSize.x, usableScreenSize.y)
|
||||
navigationBarBottom -> Point(usableScreenSize.x, realScreenSize.y - usableScreenSize.y)
|
||||
else -> Point()
|
||||
}
|
||||
|
||||
val Context.usableScreenSize: Point
|
||||
get() {
|
||||
val size = Point()
|
||||
windowManager.defaultDisplay.getSize(size)
|
||||
return size
|
||||
}
|
||||
|
||||
val Context.realScreenSize: Point
|
||||
get() {
|
||||
val size = Point()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
windowManager.defaultDisplay.getRealSize(size)
|
||||
return size
|
||||
}
|
||||
|
||||
fun Context.getRealPathFromURI(uri: Uri): String? {
|
||||
var cursor: Cursor? = null
|
||||
|
@ -51,197 +71,24 @@ fun Context.launchSettings() {
|
|||
|
||||
val Context.config: Config get() = Config.newInstance(this)
|
||||
|
||||
fun Context.getFilesFrom(curPath: String, isPickImage: Boolean, isPickVideo: Boolean): ArrayList<Medium> {
|
||||
val projection = arrayOf(MediaStore.Images.Media._ID,
|
||||
MediaStore.Images.Media.DISPLAY_NAME,
|
||||
MediaStore.Images.Media.DATE_TAKEN,
|
||||
MediaStore.Images.Media.DATE_MODIFIED,
|
||||
MediaStore.Images.Media.DATA,
|
||||
MediaStore.Images.Media.SIZE)
|
||||
val uri = MediaStore.Files.getContentUri("external")
|
||||
val selection = if (curPath.isEmpty()) null else "(${MediaStore.Images.Media.DATA} LIKE ? AND ${MediaStore.Images.Media.DATA} NOT LIKE ?)"
|
||||
val selectionArgs = if (curPath.isEmpty()) null else arrayOf("$curPath/%", "$curPath/%/%")
|
||||
fun Context.movePinnedDirectoriesToFront(dirs: ArrayList<Directory>): ArrayList<Directory> {
|
||||
val foundFolders = ArrayList<Directory>()
|
||||
val pinnedFolders = config.pinnedFolders
|
||||
|
||||
try {
|
||||
val cur = contentResolver.query(uri, projection, selection, selectionArgs, getSortingForFolder(curPath))
|
||||
return parseCursor(this, cur, isPickImage, isPickVideo, curPath)
|
||||
} catch (e: Exception) {
|
||||
return ArrayList()
|
||||
}
|
||||
dirs.forEach {
|
||||
if (pinnedFolders.contains(it.path))
|
||||
foundFolders.add(it)
|
||||
}
|
||||
|
||||
private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isPickVideo: Boolean, curPath: String): ArrayList<Medium> {
|
||||
val curMedia = ArrayList<Medium>()
|
||||
val config = context.config
|
||||
val showMedia = config.showMedia
|
||||
val showHidden = config.shouldShowHidden
|
||||
val includedFolders = config.includedFolders
|
||||
val excludedFolders = config.excludedFolders
|
||||
val noMediaFolders = context.getNoMediaFolders()
|
||||
|
||||
cur.use { cur ->
|
||||
if (cur.moveToFirst()) {
|
||||
do {
|
||||
try {
|
||||
val path = cur.getStringValue(MediaStore.Images.Media.DATA)
|
||||
var size = cur.getLongValue(MediaStore.Images.Media.SIZE)
|
||||
if (size == 0L) {
|
||||
size = File(path).length()
|
||||
dirs.removeAll(foundFolders)
|
||||
dirs.addAll(0, foundFolders)
|
||||
return dirs
|
||||
}
|
||||
|
||||
if (size <= 0L) {
|
||||
continue
|
||||
}
|
||||
|
||||
var filename = cur.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) ?: ""
|
||||
if (filename.isEmpty())
|
||||
filename = path.getFilenameFromPath()
|
||||
|
||||
val isImage = filename.isImageFast() || filename.isGif()
|
||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||
|
||||
if (!isImage && !isVideo)
|
||||
continue
|
||||
|
||||
if (isVideo && (isPickImage || showMedia == IMAGES))
|
||||
continue
|
||||
|
||||
if (isImage && (isPickVideo || showMedia == VIDEOS))
|
||||
continue
|
||||
|
||||
if (!showHidden && filename.startsWith('.'))
|
||||
continue
|
||||
|
||||
var isExcluded = false
|
||||
excludedFolders.forEach {
|
||||
if (path.startsWith("$it/")) {
|
||||
isExcluded = true
|
||||
includedFolders.forEach {
|
||||
if (path.startsWith("$it/")) {
|
||||
isExcluded = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isExcluded && !showHidden) {
|
||||
noMediaFolders.forEach {
|
||||
if (path.startsWith("$it/")) {
|
||||
isExcluded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isExcluded && !showHidden && path.contains("/.")) {
|
||||
isExcluded = true
|
||||
}
|
||||
|
||||
if (!isExcluded) {
|
||||
val dateTaken = cur.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||
val dateModified = cur.getIntValue(MediaStore.Images.Media.DATE_MODIFIED) * 1000L
|
||||
|
||||
val medium = Medium(filename, path, isVideo, dateModified, dateTaken, size)
|
||||
curMedia.add(medium)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
continue
|
||||
}
|
||||
} while (cur.moveToNext())
|
||||
}
|
||||
}
|
||||
|
||||
config.includedFolders.filter { it.isNotEmpty() && (curPath.isEmpty() || it == curPath) }.mapNotNull { File(it).listFiles() }.forEach {
|
||||
for (file in it) {
|
||||
val size = file.length()
|
||||
if (size <= 0L) {
|
||||
continue
|
||||
}
|
||||
|
||||
val filename = file.name
|
||||
val isImage = filename.isImageFast() || filename.isGif()
|
||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||
|
||||
if (!isImage && !isVideo)
|
||||
continue
|
||||
|
||||
if (isVideo && (isPickImage || showMedia == IMAGES))
|
||||
continue
|
||||
|
||||
if (isImage && (isPickVideo || showMedia == VIDEOS))
|
||||
continue
|
||||
|
||||
val dateTaken = file.lastModified()
|
||||
val dateModified = file.lastModified()
|
||||
|
||||
val medium = Medium(filename, file.absolutePath, isVideo, dateModified, dateTaken, size)
|
||||
val isAlreadyAdded = curMedia.any { it.path == file.absolutePath }
|
||||
if (!isAlreadyAdded)
|
||||
curMedia.add(medium)
|
||||
}
|
||||
}
|
||||
|
||||
Medium.sorting = config.getFileSorting(curPath)
|
||||
curMedia.sort()
|
||||
|
||||
return curMedia
|
||||
}
|
||||
|
||||
fun Context.getSortingForFolder(path: String): String {
|
||||
val sorting = config.getFileSorting(path)
|
||||
val sortValue = if (sorting and SORT_BY_NAME > 0)
|
||||
MediaStore.Images.Media.DISPLAY_NAME
|
||||
else if (sorting and SORT_BY_SIZE > 0)
|
||||
MediaStore.Images.Media.SIZE
|
||||
else if (sorting and SORT_BY_DATE_MODIFIED > 0)
|
||||
MediaStore.Images.Media.DATE_MODIFIED
|
||||
else
|
||||
MediaStore.Images.Media.DATE_TAKEN
|
||||
|
||||
return if (sorting and SORT_DESCENDING > 0)
|
||||
"$sortValue DESC"
|
||||
else
|
||||
"$sortValue ASC"
|
||||
}
|
||||
|
||||
fun Context.getNoMediaFolders(): ArrayList<String> {
|
||||
val folders = ArrayList<String>()
|
||||
val noMediaCondition = "${MediaStore.Files.FileColumns.MEDIA_TYPE} = ${MediaStore.Files.FileColumns.MEDIA_TYPE_NONE}"
|
||||
|
||||
val uri = MediaStore.Files.getContentUri("external")
|
||||
val columns = arrayOf(MediaStore.Files.FileColumns.DATA)
|
||||
val where = "$noMediaCondition AND ${MediaStore.Files.FileColumns.TITLE} LIKE ?"
|
||||
val args = arrayOf("%$NOMEDIA%")
|
||||
var cursor: Cursor? = null
|
||||
|
||||
try {
|
||||
cursor = contentResolver.query(uri, columns, where, args, null)
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
do {
|
||||
val path = cursor.getString(cursor.getColumnIndex(MediaStore.Files.FileColumns.DATA)) ?: continue
|
||||
val noMediaFile = File(path)
|
||||
if (noMediaFile.exists())
|
||||
folders.add(noMediaFile.parent)
|
||||
} while (cursor.moveToNext())
|
||||
}
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
|
||||
return folders
|
||||
}
|
||||
|
||||
fun Context.getLastMediaModified(): Int {
|
||||
val max = "max"
|
||||
val uri = MediaStore.Files.getContentUri("external")
|
||||
val projection = arrayOf(MediaStore.Images.Media._ID, "MAX(${MediaStore.Images.Media.DATE_MODIFIED}) AS $max")
|
||||
var cursor: Cursor? = null
|
||||
try {
|
||||
cursor = contentResolver.query(uri, projection, null, null, null)
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
return cursor.getIntValue(max)
|
||||
}
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
return 0
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun Context.getSortedDirectories(source: ArrayList<Directory>): ArrayList<Directory> {
|
||||
Directory.sorting = config.directorySorting
|
||||
val dirs = source.clone() as ArrayList<Directory>
|
||||
dirs.sort()
|
||||
return movePinnedDirectoriesToFront(dirs)
|
||||
}
|
||||
|
|
|
@ -24,15 +24,10 @@ import com.bumptech.glide.request.RequestOptions
|
|||
import com.bumptech.glide.request.target.Target
|
||||
import com.davemorrissey.labs.subscaleview.ImageSource
|
||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
import com.simplemobiletools.commons.extensions.beGone
|
||||
import com.simplemobiletools.commons.extensions.beVisible
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.extensions.getFileSignature
|
||||
import com.simplemobiletools.gallery.extensions.getRealPathFromURI
|
||||
import com.simplemobiletools.gallery.extensions.portrait
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
import com.simplemobiletools.gallery.helpers.GlideRotateTransformation
|
||||
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
|
@ -43,10 +38,13 @@ import java.io.FileOutputStream
|
|||
import java.io.IOException
|
||||
|
||||
class PhotoFragment : ViewPagerFragment() {
|
||||
lateinit var medium: Medium
|
||||
lateinit var view: ViewGroup
|
||||
private var isFragmentVisible = false
|
||||
private var wasInit = false
|
||||
private var storedShowExtendedDetails = false
|
||||
private var storedExtendedDetails = 0
|
||||
|
||||
lateinit var view: ViewGroup
|
||||
lateinit var medium: Medium
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
view = inflater.inflate(R.layout.pager_photo_item, container, false) as ViewGroup
|
||||
|
@ -101,12 +99,26 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
}
|
||||
loadImage()
|
||||
checkExtendedDetails()
|
||||
|
||||
wasInit = true
|
||||
|
||||
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) {
|
||||
super.setMenuVisibility(menuVisible)
|
||||
isFragmentVisible = menuVisible
|
||||
|
@ -123,14 +135,12 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun degreesForRotation(orientation: Int): Int {
|
||||
return when (orientation) {
|
||||
private fun degreesForRotation(orientation: Int) = when (orientation) {
|
||||
8 -> 270
|
||||
3 -> 180
|
||||
6 -> 90
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
private fun rotateViaMatrix(original: Bitmap, orientation: Int): Bitmap {
|
||||
val degrees = degreesForRotation(orientation).toFloat()
|
||||
|
@ -168,7 +178,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
val options = RequestOptions()
|
||||
.signature(medium.path.getFileSignature())
|
||||
.format(DecodeFormat.PREFER_ARGB_8888)
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.override(targetWidth, targetHeight)
|
||||
|
||||
Glide.with(this)
|
||||
|
@ -176,9 +186,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
.load(medium.path)
|
||||
.apply(options)
|
||||
.listener(object : RequestListener<Bitmap> {
|
||||
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Bitmap>?, isFirstResource: Boolean): Boolean {
|
||||
return false
|
||||
}
|
||||
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Bitmap>?, isFirstResource: Boolean) = false
|
||||
|
||||
override fun onResourceReady(resource: Bitmap?, model: Any?, target: Target<Bitmap>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
|
||||
if (isFragmentVisible)
|
||||
|
@ -203,6 +211,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
private fun addZoomableView() {
|
||||
if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.visibility == View.GONE) {
|
||||
view.subsampling_view.apply {
|
||||
//setBitmapDecoderClass(GlideDecoder::class.java) // causing random crashes on Android 7+
|
||||
maxScale = 10f
|
||||
beVisible()
|
||||
setImage(ImageSource.uri(medium.path))
|
||||
|
@ -222,7 +231,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
override fun onPreviewReleased() {
|
||||
}
|
||||
|
||||
override fun onImageLoadError(e: Exception?) {
|
||||
override fun onImageLoadError(e: Exception) {
|
||||
background = ColorDrawable(Color.TRANSPARENT)
|
||||
beGone()
|
||||
}
|
||||
|
@ -256,18 +265,32 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
fun refreshBitmap() {
|
||||
view.subsampling_view.beGone()
|
||||
loadBitmap()
|
||||
}
|
||||
|
||||
fun rotateImageViewBy(degrees: Float) {
|
||||
view.subsampling_view.beGone()
|
||||
loadBitmap(degrees)
|
||||
}
|
||||
|
||||
private fun checkExtendedDetails() {
|
||||
if (context.config.showExtendedDetails) {
|
||||
view.photo_details.apply {
|
||||
text = getMediumExtendedDetails(medium)
|
||||
setTextColor(context.config.textColor)
|
||||
beVisible()
|
||||
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() {
|
||||
super.onDestroyView()
|
||||
context.isKitkatPlus()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && !activity.isDestroyed) {
|
||||
Glide.with(context).clear(view.photo_view)
|
||||
}
|
||||
|
@ -276,6 +299,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
loadImage()
|
||||
checkExtendedDetails()
|
||||
}
|
||||
|
||||
private fun photoClicked() {
|
||||
|
@ -283,6 +307,13 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,15 +14,10 @@ import android.view.*
|
|||
import android.view.animation.AnimationUtils
|
||||
import android.widget.SeekBar
|
||||
import android.widget.TextView
|
||||
import com.simplemobiletools.commons.extensions.getFormattedDuration
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
||||
import com.simplemobiletools.gallery.extensions.audioManager
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.extensions.getNavBarHeight
|
||||
import com.simplemobiletools.gallery.extensions.hasNavBar
|
||||
import com.simplemobiletools.gallery.extensions.*
|
||||
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
import kotlinx.android.synthetic.main.pager_video_item.view.*
|
||||
|
@ -38,13 +33,14 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
private var mCurrTimeView: TextView? = null
|
||||
private var mTimerHandler: Handler? = null
|
||||
private var mSeekBar: SeekBar? = null
|
||||
private var mTimeHolder: View? = null
|
||||
|
||||
private var mIsPlaying = false
|
||||
private var mIsDragged = false
|
||||
private var mIsFullscreen = false
|
||||
private var mIsFragmentVisible = false
|
||||
private var mPlayOnPrepare = false
|
||||
private var mStoredShowExtendedDetails = false
|
||||
private var mStoredExtendedDetails = 0
|
||||
private var mCurrTime = 0
|
||||
private var mDuration = 0
|
||||
|
||||
|
@ -61,6 +57,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
|
||||
lateinit var mView: View
|
||||
lateinit var medium: Medium
|
||||
lateinit var mTimeHolder: View
|
||||
|
||||
companion object {
|
||||
private val TAG = VideoFragment::class.java.simpleName
|
||||
|
@ -69,9 +66,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
mView = inflater.inflate(R.layout.pager_video_item, container, false)
|
||||
setupPlayer()
|
||||
|
||||
mTimeHolder = mView.video_time_holder
|
||||
medium = arguments.getSerializable(MEDIUM) as Medium
|
||||
|
||||
setupPlayer()
|
||||
if (savedInstanceState != null) {
|
||||
mCurrTime = savedInstanceState.getInt(PROGRESS)
|
||||
}
|
||||
|
@ -85,6 +83,27 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
activity.updateTextColors(mView.video_holder)
|
||||
mView.video_volume_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()
|
||||
mIsFragmentVisible = false
|
||||
mStoredShowExtendedDetails = context.config.showExtendedDetails
|
||||
mStoredExtendedDetails = context.config.extendedDetails
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
if (activity?.isChangingConfigurations == false) {
|
||||
cleanup()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupPlayer() {
|
||||
|
@ -109,6 +128,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
}
|
||||
|
||||
initTimeHolder()
|
||||
checkExtendedDetails()
|
||||
}
|
||||
|
||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
||||
|
@ -131,6 +151,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
super.onConfigurationChanged(newConfig)
|
||||
setVideoSize()
|
||||
initTimeHolder()
|
||||
checkExtendedDetails()
|
||||
}
|
||||
|
||||
private fun toggleFullscreen() {
|
||||
|
@ -151,7 +172,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
val diffX = mTouchDownX - event.x
|
||||
val diffY = mTouchDownY - event.y
|
||||
|
||||
if (Math.abs(diffY) > Math.abs(diffX)) {
|
||||
if (Math.abs(diffY) > 20 && Math.abs(diffY) > Math.abs(diffX)) {
|
||||
var percent = ((diffY / ViewPagerActivity.screenHeight) * 100).toInt() * 3
|
||||
percent = Math.min(100, Math.max(-100, percent))
|
||||
|
||||
|
@ -165,7 +186,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
mLastTouchY = event.y
|
||||
}
|
||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||
if (System.currentTimeMillis() - mTouchDownTime < CLICK_MAX_DURATION) {
|
||||
val diffX = Math.abs(event.x - mTouchDownX)
|
||||
val diffY = Math.abs(event.y - mTouchDownY)
|
||||
if (System.currentTimeMillis() - mTouchDownTime < CLICK_MAX_DURATION && diffX < 20 && diffY < 20) {
|
||||
mView.video_holder.performClick()
|
||||
}
|
||||
}
|
||||
|
@ -187,7 +210,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
val diffX = mTouchDownX - event.x
|
||||
val diffY = mTouchDownY - event.y
|
||||
|
||||
if (Math.abs(diffY) > Math.abs(diffX)) {
|
||||
if (Math.abs(diffY) > 20 && Math.abs(diffY) > Math.abs(diffX)) {
|
||||
var percent = ((diffY / ViewPagerActivity.screenHeight) * 100).toInt() * 3
|
||||
percent = Math.min(100, Math.max(-100, percent))
|
||||
|
||||
|
@ -201,7 +224,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
mLastTouchY = event.y
|
||||
}
|
||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||
if (System.currentTimeMillis() - mTouchDownTime < CLICK_MAX_DURATION) {
|
||||
val diffX = Math.abs(event.x - mTouchDownX)
|
||||
val diffY = Math.abs(event.y - mTouchDownY)
|
||||
if (System.currentTimeMillis() - mTouchDownTime < CLICK_MAX_DURATION && diffX < 20 && diffY < 20) {
|
||||
mView.video_holder.performClick()
|
||||
}
|
||||
mTouchDownBrightness = mTempBrightness
|
||||
|
@ -257,11 +282,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
}
|
||||
|
||||
private fun initTimeHolder() {
|
||||
mTimeHolder = mView.video_time_holder
|
||||
val res = resources
|
||||
val height = res.getNavBarHeight()
|
||||
val left = mTimeHolder!!.paddingLeft
|
||||
val top = mTimeHolder!!.paddingTop
|
||||
val height = context.navigationBarHeight
|
||||
val left = mTimeHolder.paddingLeft
|
||||
val top = mTimeHolder.paddingTop
|
||||
var right = res.getDimension(R.dimen.timer_padding).toInt()
|
||||
var bottom = 0
|
||||
|
||||
|
@ -270,8 +294,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
bottom += height
|
||||
} else {
|
||||
right += height
|
||||
bottom += context.navigationBarHeight
|
||||
}
|
||||
mTimeHolder!!.setPadding(left, top, right, bottom)
|
||||
mTimeHolder.setPadding(left, top, right, bottom)
|
||||
}
|
||||
|
||||
mCurrTimeView = mView.video_curr_time
|
||||
|
@ -279,7 +304,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
mSeekBar!!.setOnSeekBarChangeListener(this)
|
||||
|
||||
if (mIsFullscreen)
|
||||
mTimeHolder!!.visibility = View.INVISIBLE
|
||||
mTimeHolder.beInvisible()
|
||||
}
|
||||
|
||||
private fun setupTimeHolder() {
|
||||
|
@ -323,7 +348,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
AnimationUtils.loadAnimation(activity, anim).apply {
|
||||
duration = 150
|
||||
fillAfter = true
|
||||
mTimeHolder!!.startAnimation(this)
|
||||
mTimeHolder.startAnimation(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -388,19 +413,6 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
mMediaPlayer!!.pause()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
pauseVideo()
|
||||
mIsFragmentVisible = false
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
if (activity?.isChangingConfigurations == false) {
|
||||
cleanup()
|
||||
}
|
||||
}
|
||||
|
||||
private fun cleanup() {
|
||||
pauseVideo()
|
||||
mCurrTimeView?.text = 0.getFormattedDuration()
|
||||
|
@ -489,6 +501,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)
|
||||
beVisible()
|
||||
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) {
|
||||
if (mMediaPlayer != null && fromUser) {
|
||||
setProgress(progress)
|
||||
|
@ -517,5 +548,14 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
override fun fullscreenToggled(isFullscreen: Boolean) {
|
||||
mIsFullscreen = isFullscreen
|
||||
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
|
||||
|
||||
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() {
|
||||
var listener: FragmentListener? = null
|
||||
|
@ -12,4 +17,44 @@ abstract class ViewPagerFragment : Fragment() {
|
|||
|
||||
fun videoEnded(): Boolean
|
||||
}
|
||||
|
||||
fun getMediumExtendedDetails(medium: Medium): String {
|
||||
val file = File(medium.path)
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,17 +28,17 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
if (path.isEmpty()) {
|
||||
fileSorting = value
|
||||
} else {
|
||||
prefs.edit().putInt(SORT_FOLDER_PREFIX + path, value).apply()
|
||||
prefs.edit().putInt(SORT_FOLDER_PREFIX + path.toLowerCase(), value).apply()
|
||||
}
|
||||
}
|
||||
|
||||
fun getFileSorting(path: String) = prefs.getInt(SORT_FOLDER_PREFIX + path, fileSorting)
|
||||
fun getFileSorting(path: String) = prefs.getInt(SORT_FOLDER_PREFIX + path.toLowerCase(), fileSorting)
|
||||
|
||||
fun removeFileSorting(path: String) {
|
||||
prefs.edit().remove(SORT_FOLDER_PREFIX + path).apply()
|
||||
prefs.edit().remove(SORT_FOLDER_PREFIX + path.toLowerCase()).apply()
|
||||
}
|
||||
|
||||
fun hasCustomSorting(path: String) = prefs.contains(SORT_FOLDER_PREFIX + path)
|
||||
fun hasCustomSorting(path: String) = prefs.contains(SORT_FOLDER_PREFIX + path.toLowerCase())
|
||||
|
||||
var wasHideFolderTooltipShown: Boolean
|
||||
get() = prefs.getBoolean(HIDE_FOLDER_TOOLTIP_SHOWN, false)
|
||||
|
@ -54,6 +54,10 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
get() = prefs.getBoolean(TEMPORARILY_SHOW_HIDDEN, false)
|
||||
set(temporarilyShowHidden) = prefs.edit().putBoolean(TEMPORARILY_SHOW_HIDDEN, temporarilyShowHidden).apply()
|
||||
|
||||
var isThirdPartyIntent: Boolean
|
||||
get() = prefs.getBoolean(IS_THIRD_PARTY_INTENT, false)
|
||||
set(isThirdPartyIntent) = prefs.edit().putBoolean(IS_THIRD_PARTY_INTENT, isThirdPartyIntent).apply()
|
||||
|
||||
var pinnedFolders: Set<String>
|
||||
get() = prefs.getStringSet(PINNED_FOLDERS, HashSet<String>())
|
||||
set(pinnedFolders) = prefs.edit().putStringSet(PINNED_FOLDERS, pinnedFolders).apply()
|
||||
|
@ -156,9 +160,9 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
get() = prefs.getBoolean(DARK_BACKGROUND, false)
|
||||
set(darkBackground) = prefs.edit().putBoolean(DARK_BACKGROUND, darkBackground).apply()
|
||||
|
||||
var showMedia: Int
|
||||
get() = prefs.getInt(SHOW_MEDIA, IMAGES_AND_VIDEOS)
|
||||
set(showMedia) = prefs.edit().putInt(SHOW_MEDIA, showMedia).apply()
|
||||
var filterMedia: Int
|
||||
get() = prefs.getInt(FILTER_MEDIA, IMAGES or VIDEOS or GIFS)
|
||||
set(filterMedia) = prefs.edit().putInt(FILTER_MEDIA, filterMedia).apply()
|
||||
|
||||
var dirColumnCnt: Int
|
||||
get() = prefs.getInt(getDirectoryColumnsField(), getDefaultDirectoryColumnCount())
|
||||
|
@ -233,6 +237,14 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
get() = prefs.getBoolean(REPLACE_SHARE_WITH_ROTATE, false)
|
||||
set(replaceShare) = prefs.edit().putBoolean(REPLACE_SHARE_WITH_ROTATE, replaceShare).apply()
|
||||
|
||||
var deleteEmptyFolders: Boolean
|
||||
get() = prefs.getBoolean(DELETE_EMPTY_FOLDERS, true)
|
||||
set(deleteEmptyFolders) = prefs.edit().putBoolean(DELETE_EMPTY_FOLDERS, deleteEmptyFolders).apply()
|
||||
|
||||
var allowVideoGestures: Boolean
|
||||
get() = prefs.getBoolean(ALLOW_VIDEO_GESTURES, true)
|
||||
set(allowVideoGestures) = prefs.edit().putBoolean(ALLOW_VIDEO_GESTURES, allowVideoGestures).apply()
|
||||
|
||||
var slideshowInterval: Int
|
||||
get() = prefs.getInt(SLIDESHOW_INTERVAL, SLIDESHOW_DEFAULT_INTERVAL)
|
||||
set(slideshowInterval) = prefs.edit().putInt(SLIDESHOW_INTERVAL, slideshowInterval).apply()
|
||||
|
@ -245,6 +257,10 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
get() = prefs.getBoolean(SLIDESHOW_INCLUDE_VIDEOS, false)
|
||||
set(slideshowIncludeVideos) = prefs.edit().putBoolean(SLIDESHOW_INCLUDE_VIDEOS, slideshowIncludeVideos).apply()
|
||||
|
||||
var slideshowIncludeGIFs: Boolean
|
||||
get() = prefs.getBoolean(SLIDESHOW_INCLUDE_GIFS, false)
|
||||
set(slideshowIncludeGIFs) = prefs.edit().putBoolean(SLIDESHOW_INCLUDE_GIFS, slideshowIncludeGIFs).apply()
|
||||
|
||||
var slideshowRandomOrder: Boolean
|
||||
get() = prefs.getBoolean(SLIDESHOW_RANDOM_ORDER, false)
|
||||
set(slideshowRandomOrder) = prefs.edit().putBoolean(SLIDESHOW_RANDOM_ORDER, slideshowRandomOrder).apply()
|
||||
|
@ -256,4 +272,28 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
var slideshowMoveBackwards: Boolean
|
||||
get() = prefs.getBoolean(SLIDESHOW_MOVE_BACKWARDS, false)
|
||||
set(slideshowMoveBackwards) = prefs.edit().putBoolean(SLIDESHOW_MOVE_BACKWARDS, slideshowMoveBackwards).apply()
|
||||
|
||||
var loopSlideshow: Boolean
|
||||
get() = prefs.getBoolean(SLIDESHOW_LOOP, false)
|
||||
set(loopSlideshow) = prefs.edit().putBoolean(SLIDESHOW_LOOP, loopSlideshow).apply()
|
||||
|
||||
var tempFolderPath: String
|
||||
get() = prefs.getString(TEMP_FOLDER_PATH, "")
|
||||
set(tempFolderPath) = prefs.edit().putString(TEMP_FOLDER_PATH, tempFolderPath).apply()
|
||||
|
||||
var viewTypeFolders: Int
|
||||
get() = prefs.getInt(VIEW_TYPE_FOLDERS, VIEW_TYPE_GRID)
|
||||
set(viewTypeFolders) = prefs.edit().putInt(VIEW_TYPE_FOLDERS, viewTypeFolders).apply()
|
||||
|
||||
var viewTypeFiles: Int
|
||||
get() = prefs.getInt(VIEW_TYPE_FILES, VIEW_TYPE_GRID)
|
||||
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()
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ val DIRECTORY_SORT_ORDER = "directory_sort_order"
|
|||
val SORT_FOLDER_PREFIX = "sort_folder_"
|
||||
val SHOW_HIDDEN_MEDIA = "show_hidden_media"
|
||||
val TEMPORARILY_SHOW_HIDDEN = "temporarily_show_hidden"
|
||||
val IS_THIRD_PARTY_INTENT = "is_third_party_intent"
|
||||
val AUTOPLAY_VIDEOS = "autoplay_videos"
|
||||
val LOOP_VIDEOS = "loop_videos"
|
||||
val ANIMATE_GIFS = "animate_gifs"
|
||||
|
@ -15,6 +16,7 @@ val SCREEN_ROTATION = "screen_rotation"
|
|||
val DISPLAY_FILE_NAMES = "display_file_names"
|
||||
val DARK_BACKGROUND = "dark_background"
|
||||
val PINNED_FOLDERS = "pinned_folders"
|
||||
val FILTER_MEDIA = "filter_media"
|
||||
val DIR_COLUMN_CNT = "dir_column_cnt"
|
||||
val DIR_LANDSCAPE_COLUMN_CNT = "dir_landscape_column_cnt"
|
||||
val DIR_HORIZONTAL_COLUMN_CNT = "dir_horizontal_column_cnt"
|
||||
|
@ -24,7 +26,6 @@ val MEDIA_LANDSCAPE_COLUMN_CNT = "media_landscape_column_cnt"
|
|||
val MEDIA_HORIZONTAL_COLUMN_CNT = "media_horizontal_column_cnt"
|
||||
val MEDIA_LANDSCAPE_HORIZONTAL_COLUMN_CNT = "media_landscape_horizontal_column_cnt"
|
||||
val SHOW_ALL = "show_all" // display images and videos from all folders together
|
||||
val SHOW_MEDIA = "show_media"
|
||||
val SAVE_FOLDER_PREFIX = "folder2_"
|
||||
val HIDE_FOLDER_TOOLTIP_SHOWN = "hide_folder_tooltip_shown"
|
||||
val EXCLUDED_FOLDERS = "excluded_folders"
|
||||
|
@ -33,15 +34,25 @@ val ALBUM_COVERS = "album_covers"
|
|||
val SCROLL_HORIZONTALLY = "scroll_horizontally"
|
||||
val HIDE_SYSTEM_UI = "hide_system_ui"
|
||||
val REPLACE_SHARE_WITH_ROTATE = "replace_share_with_rotate"
|
||||
val DELETE_EMPTY_FOLDERS = "delete_empty_folders"
|
||||
val ALLOW_VIDEO_GESTURES = "allow_video_gestures"
|
||||
val TEMP_FOLDER_PATH = "temp_folder_path"
|
||||
val VIEW_TYPE_FOLDERS = "view_type_folders"
|
||||
val VIEW_TYPE_FILES = "view_type_files"
|
||||
val SHOW_EXTENDED_DETAILS = "show_extended_details"
|
||||
val EXTENDED_DETAILS = "extended_details"
|
||||
|
||||
// slideshow
|
||||
val SLIDESHOW_INTERVAL = "slideshow_interval"
|
||||
val SLIDESHOW_INCLUDE_PHOTOS = "slideshow_include_photos"
|
||||
val SLIDESHOW_INCLUDE_VIDEOS = "slideshow_include_videos"
|
||||
val SLIDESHOW_INCLUDE_GIFS = "slideshow_include_gifs"
|
||||
val SLIDESHOW_RANDOM_ORDER = "slideshow_random_order"
|
||||
val SLIDESHOW_USE_FADE = "slideshow_use_fade"
|
||||
val SLIDESHOW_MOVE_BACKWARDS = "slideshow_move_backwards"
|
||||
val SLIDESHOW_LOOP = "loop_slideshow"
|
||||
val SLIDESHOW_DEFAULT_INTERVAL = 5
|
||||
val SLIDESHOW_SCROLL_DURATION = 500L
|
||||
|
||||
val NOMEDIA = ".nomedia"
|
||||
|
||||
|
@ -53,15 +64,12 @@ val GET_ANY_INTENT = "get_any_intent"
|
|||
val SET_WALLPAPER_INTENT = "set_wallpaper_intent"
|
||||
val DIRECTORIES = "directories2"
|
||||
val IS_VIEW_INTENT = "is_view_intent"
|
||||
val IS_FROM_GALLERY = "is_from_gallery"
|
||||
val PICKED_PATHS = "picked_paths"
|
||||
|
||||
val REQUEST_EDIT_IMAGE = 1
|
||||
val REQUEST_SET_AS = 2
|
||||
|
||||
// show media
|
||||
val IMAGES_AND_VIDEOS = 0
|
||||
val IMAGES = 1
|
||||
val VIDEOS = 2
|
||||
|
||||
// rotations
|
||||
val ROTATE_BY_SYSTEM_SETTING = 0
|
||||
val ROTATE_BY_DEVICE_ROTATION = 1
|
||||
|
@ -70,4 +78,25 @@ val ROTATE_BY_ASPECT_RATIO = 2
|
|||
val ORIENT_PORTRAIT = 0
|
||||
val ORIENT_LANDSCAPE_LEFT = 1
|
||||
val ORIENT_LANDSCAPE_RIGHT = 2
|
||||
val ORIENT_UPSIDE_DOWN = 3
|
||||
|
||||
// filter media
|
||||
val IMAGES = 1
|
||||
val VIDEOS = 2
|
||||
val GIFS = 4
|
||||
|
||||
// view types
|
||||
val VIEW_TYPE_GRID = 1
|
||||
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
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
package com.simplemobiletools.gallery.helpers
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.media.ExifInterface
|
||||
import android.net.Uri
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import com.davemorrissey.labs.subscaleview.decoder.ImageDecoder
|
||||
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
||||
import com.simplemobiletools.gallery.extensions.getFileSignature
|
||||
|
||||
class GlideDecoder : ImageDecoder {
|
||||
override fun decode(context: Context, uri: Uri): Bitmap {
|
||||
val exif = android.media.ExifInterface(uri.path)
|
||||
val orientation = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, android.media.ExifInterface.ORIENTATION_NORMAL)
|
||||
|
||||
val targetWidth = if (ViewPagerActivity.screenWidth == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenWidth
|
||||
val targetHeight = if (ViewPagerActivity.screenHeight == 0) Target.SIZE_ORIGINAL else ViewPagerActivity.screenHeight
|
||||
|
||||
val options = RequestOptions()
|
||||
.signature(uri.path.getFileSignature())
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.override(targetWidth, targetHeight)
|
||||
|
||||
val degrees = getRotationDegrees(orientation)
|
||||
if (degrees != 0f)
|
||||
options.transform(GlideRotateTransformation(context, getRotationDegrees(orientation)))
|
||||
|
||||
val drawable = Glide.with(context)
|
||||
.load(uri)
|
||||
.apply(options)
|
||||
.submit()
|
||||
.get()
|
||||
|
||||
return drawableToBitmap(drawable)
|
||||
}
|
||||
|
||||
private fun drawableToBitmap(drawable: Drawable): Bitmap {
|
||||
if (drawable is BitmapDrawable) {
|
||||
if (drawable.bitmap != null) {
|
||||
return drawable.bitmap
|
||||
}
|
||||
}
|
||||
|
||||
val bitmap = if (drawable.intrinsicWidth <= 0 || drawable.intrinsicHeight <= 0) {
|
||||
Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
|
||||
} else {
|
||||
Bitmap.createBitmap(drawable.intrinsicWidth, drawable.intrinsicHeight, Bitmap.Config.ARGB_8888)
|
||||
}
|
||||
|
||||
val canvas = Canvas(bitmap)
|
||||
drawable.setBounds(0, 0, canvas.width, canvas.height)
|
||||
drawable.draw(canvas)
|
||||
return bitmap
|
||||
}
|
||||
|
||||
// rotating backwards intentionally, as SubsamplingScaleImageView will rotate it properly at displaying
|
||||
private fun getRotationDegrees(orientation: Int) = when (orientation) {
|
||||
ExifInterface.ORIENTATION_ROTATE_270 -> 90f
|
||||
ExifInterface.ORIENTATION_ROTATE_180 -> 180f
|
||||
ExifInterface.ORIENTATION_ROTATE_90 -> 270f
|
||||
else -> 0f
|
||||
}
|
||||
}
|
|
@ -0,0 +1,331 @@
|
|||
package com.simplemobiletools.gallery.helpers
|
||||
|
||||
import android.content.Context
|
||||
import android.database.Cursor
|
||||
import android.provider.MediaStore
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_NAME
|
||||
import com.simplemobiletools.commons.helpers.SORT_BY_SIZE
|
||||
import com.simplemobiletools.commons.helpers.SORT_DESCENDING
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import com.simplemobiletools.gallery.extensions.containsNoMedia
|
||||
import com.simplemobiletools.gallery.models.Medium
|
||||
import java.io.File
|
||||
import java.util.LinkedHashMap
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
|
||||
class MediaFetcher(val context: Context) {
|
||||
var shouldStop = false
|
||||
|
||||
fun getMediaByDirectories(isPickVideo: Boolean, isPickImage: Boolean): HashMap<String, ArrayList<Medium>> {
|
||||
val media = getFilesFrom("", isPickImage, isPickVideo)
|
||||
val excludedPaths = context.config.excludedFolders
|
||||
val includedPaths = context.config.includedFolders
|
||||
val showHidden = context.config.shouldShowHidden
|
||||
val directories = groupDirectories(media)
|
||||
|
||||
val removePaths = ArrayList<String>()
|
||||
for ((path, curMedia) in directories) {
|
||||
// make sure the path has uppercase letters wherever appropriate
|
||||
val groupPath = File(curMedia.first().path).parent
|
||||
if (!File(groupPath).exists() || !shouldFolderBeVisible(groupPath, excludedPaths, includedPaths, showHidden)) {
|
||||
removePaths.add(groupPath.toLowerCase())
|
||||
}
|
||||
}
|
||||
|
||||
removePaths.forEach {
|
||||
directories.remove(it)
|
||||
}
|
||||
|
||||
return directories
|
||||
}
|
||||
|
||||
fun getFilesFrom(curPath: String, isPickImage: Boolean, isPickVideo: Boolean): ArrayList<Medium> {
|
||||
val projection = arrayOf(MediaStore.Images.Media._ID,
|
||||
MediaStore.Images.Media.DISPLAY_NAME,
|
||||
MediaStore.Images.Media.DATE_TAKEN,
|
||||
MediaStore.Images.Media.DATE_MODIFIED,
|
||||
MediaStore.Images.Media.DATA,
|
||||
MediaStore.Images.Media.SIZE)
|
||||
val uri = MediaStore.Files.getContentUri("external")
|
||||
val selection = getSelectionQuery(curPath)
|
||||
val selectionArgs = getSelectionArgsQuery(curPath)
|
||||
|
||||
return try {
|
||||
val cur = context.contentResolver.query(uri, projection, selection, selectionArgs, getSortingForFolder(curPath))
|
||||
parseCursor(context, cur, isPickImage, isPickVideo, curPath)
|
||||
} catch (e: Exception) {
|
||||
ArrayList()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getSelectionQuery(path: String): String? {
|
||||
val dataQuery = "${MediaStore.Images.Media.DATA} LIKE ?"
|
||||
return if (path.isEmpty()) {
|
||||
if (context.isAndroidFour())
|
||||
return null
|
||||
|
||||
var query = "($dataQuery)"
|
||||
if (context.hasExternalSDCard()) {
|
||||
query += " OR ($dataQuery)"
|
||||
}
|
||||
query
|
||||
} else {
|
||||
"($dataQuery AND ${MediaStore.Images.Media.DATA} NOT LIKE ?)"
|
||||
}
|
||||
}
|
||||
|
||||
private fun getSelectionArgsQuery(path: String): Array<String>? {
|
||||
return if (path.isEmpty()) {
|
||||
if (context.isAndroidFour())
|
||||
return null
|
||||
|
||||
if (context.hasExternalSDCard()) {
|
||||
arrayOf("${context.internalStoragePath}/%", "${context.sdCardPath}/%")
|
||||
} else {
|
||||
arrayOf("${context.internalStoragePath}/%")
|
||||
}
|
||||
} else {
|
||||
arrayOf("$path/%", "$path/%/%")
|
||||
}
|
||||
}
|
||||
|
||||
private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isPickVideo: Boolean, curPath: String): ArrayList<Medium> {
|
||||
val curMedia = ArrayList<Medium>()
|
||||
val config = context.config
|
||||
val filterMedia = config.filterMedia
|
||||
val showHidden = config.shouldShowHidden
|
||||
val includedFolders = config.includedFolders.map { "${it.trimEnd('/')}/" }
|
||||
val excludedFolders = config.excludedFolders.map { "${it.trimEnd('/')}/" }
|
||||
val noMediaFolders = getNoMediaFolders()
|
||||
val isThirdPartyIntent = config.isThirdPartyIntent
|
||||
|
||||
cur.use {
|
||||
if (cur.moveToFirst()) {
|
||||
do {
|
||||
try {
|
||||
if (shouldStop)
|
||||
break
|
||||
|
||||
val path = cur.getStringValue(MediaStore.Images.Media.DATA).trim()
|
||||
var filename = cur.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)?.trim() ?: ""
|
||||
if (filename.isEmpty())
|
||||
filename = path.getFilenameFromPath()
|
||||
|
||||
val isImage = filename.isImageFast()
|
||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||
val isGif = if (isImage || isVideo) false else filename.isGif()
|
||||
|
||||
if (!isImage && !isVideo && !isGif)
|
||||
continue
|
||||
|
||||
if (isVideo && (isPickImage || filterMedia and VIDEOS == 0))
|
||||
continue
|
||||
|
||||
if (isImage && (isPickVideo || filterMedia and IMAGES == 0))
|
||||
continue
|
||||
|
||||
if (isGif && filterMedia and GIFS == 0)
|
||||
continue
|
||||
|
||||
if (!showHidden && filename.startsWith('.'))
|
||||
continue
|
||||
|
||||
var size = cur.getLongValue(MediaStore.Images.Media.SIZE)
|
||||
val file = File(path)
|
||||
if (size == 0L) {
|
||||
size = file.length()
|
||||
}
|
||||
|
||||
if (size <= 0L)
|
||||
continue
|
||||
|
||||
var isExcluded = false
|
||||
excludedFolders.forEach {
|
||||
if (path.startsWith(it)) {
|
||||
isExcluded = true
|
||||
includedFolders.forEach {
|
||||
if (path.startsWith(it)) {
|
||||
isExcluded = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isExcluded && !showHidden) {
|
||||
noMediaFolders.forEach {
|
||||
if (path.startsWith(it)) {
|
||||
isExcluded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isExcluded && !showHidden && path.contains("/.")) {
|
||||
isExcluded = true
|
||||
}
|
||||
|
||||
if (!isExcluded || isThirdPartyIntent) {
|
||||
if (!file.exists())
|
||||
continue
|
||||
|
||||
val dateTaken = cur.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||
val dateModified = cur.getIntValue(MediaStore.Images.Media.DATE_MODIFIED) * 1000L
|
||||
|
||||
val medium = Medium(filename, path, isVideo, dateModified, dateTaken, size)
|
||||
curMedia.add(medium)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
continue
|
||||
}
|
||||
} while (cur.moveToNext())
|
||||
}
|
||||
}
|
||||
|
||||
config.includedFolders.filter { it.isNotEmpty() && (curPath.isEmpty() || it == curPath) }.forEach {
|
||||
getMediaInFolder(it, curMedia, isPickImage, isPickVideo, filterMedia)
|
||||
}
|
||||
|
||||
if (isThirdPartyIntent && curPath.isNotEmpty() && curMedia.isEmpty()) {
|
||||
getMediaInFolder(curPath, curMedia, isPickImage, isPickVideo, filterMedia)
|
||||
}
|
||||
|
||||
Medium.sorting = config.getFileSorting(curPath)
|
||||
curMedia.sort()
|
||||
|
||||
return curMedia
|
||||
}
|
||||
|
||||
private fun groupDirectories(media: ArrayList<Medium>): HashMap<String, ArrayList<Medium>> {
|
||||
val directories = LinkedHashMap<String, ArrayList<Medium>>()
|
||||
for (medium in media) {
|
||||
if (shouldStop)
|
||||
break
|
||||
|
||||
val parentDir = File(medium.path).parent?.toLowerCase() ?: continue
|
||||
if (directories.containsKey(parentDir)) {
|
||||
directories[parentDir]!!.add(medium)
|
||||
} else {
|
||||
directories.put(parentDir, arrayListOf(medium))
|
||||
}
|
||||
}
|
||||
return directories
|
||||
}
|
||||
|
||||
private fun shouldFolderBeVisible(path: String, excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>, showHidden: Boolean): Boolean {
|
||||
val file = File(path)
|
||||
return if (includedPaths.contains(path)) {
|
||||
true
|
||||
} else if (isThisOrParentExcluded(path, excludedPaths, includedPaths)) {
|
||||
false
|
||||
} else if (!showHidden && file.isDirectory && file.canonicalFile == file.absoluteFile) {
|
||||
var containsNoMediaOrDot = file.containsNoMedia() || path.contains("/.")
|
||||
if (!containsNoMediaOrDot) {
|
||||
containsNoMediaOrDot = checkParentHasNoMedia(file.parentFile)
|
||||
}
|
||||
!containsNoMediaOrDot
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkParentHasNoMedia(file: File): Boolean {
|
||||
var curFile = file
|
||||
while (true) {
|
||||
if (curFile.containsNoMedia()) {
|
||||
return true
|
||||
}
|
||||
curFile = curFile.parentFile
|
||||
if (curFile.absolutePath == "/")
|
||||
break
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
private fun isThisOrParentExcluded(path: String, excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>) =
|
||||
includedPaths.none { path.startsWith(it) } && excludedPaths.any { path.startsWith(it) }
|
||||
|
||||
|
||||
private fun getMediaInFolder(folder: String, curMedia: ArrayList<Medium>, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int) {
|
||||
val files = File(folder).listFiles() ?: return
|
||||
for (file in files) {
|
||||
if (shouldStop)
|
||||
break
|
||||
|
||||
val filename = file.name
|
||||
val isImage = filename.isImageFast()
|
||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||
val isGif = if (isImage || isVideo) false else filename.isGif()
|
||||
|
||||
if (!isImage && !isVideo)
|
||||
continue
|
||||
|
||||
if (isVideo && (isPickImage || filterMedia and VIDEOS == 0))
|
||||
continue
|
||||
|
||||
if (isImage && (isPickVideo || filterMedia and IMAGES == 0))
|
||||
continue
|
||||
|
||||
if (isGif && filterMedia and GIFS == 0)
|
||||
continue
|
||||
|
||||
val size = file.length()
|
||||
if (size <= 0L)
|
||||
continue
|
||||
|
||||
val dateTaken = file.lastModified()
|
||||
val dateModified = file.lastModified()
|
||||
|
||||
val medium = Medium(filename, file.absolutePath, isVideo, dateModified, dateTaken, size)
|
||||
val isAlreadyAdded = curMedia.any { it.path == file.absolutePath }
|
||||
if (!isAlreadyAdded) {
|
||||
curMedia.add(medium)
|
||||
context.scanPath(file.absolutePath) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getSortingForFolder(path: String): String {
|
||||
val sorting = context.config.getFileSorting(path)
|
||||
val sortValue = when {
|
||||
sorting and SORT_BY_NAME > 0 -> MediaStore.Images.Media.DISPLAY_NAME
|
||||
sorting and SORT_BY_SIZE > 0 -> MediaStore.Images.Media.SIZE
|
||||
sorting and SORT_BY_DATE_MODIFIED > 0 -> MediaStore.Images.Media.DATE_MODIFIED
|
||||
else -> MediaStore.Images.Media.DATE_TAKEN
|
||||
}
|
||||
|
||||
return if (sorting and SORT_DESCENDING > 0)
|
||||
"$sortValue DESC"
|
||||
else
|
||||
"$sortValue ASC"
|
||||
}
|
||||
|
||||
private fun getNoMediaFolders(): ArrayList<String> {
|
||||
val folders = ArrayList<String>()
|
||||
val noMediaCondition = "${MediaStore.Files.FileColumns.MEDIA_TYPE} = ${MediaStore.Files.FileColumns.MEDIA_TYPE_NONE}"
|
||||
|
||||
val uri = MediaStore.Files.getContentUri("external")
|
||||
val columns = arrayOf(MediaStore.Files.FileColumns.DATA)
|
||||
val where = "$noMediaCondition AND ${MediaStore.Files.FileColumns.TITLE} LIKE ?"
|
||||
val args = arrayOf("%$NOMEDIA%")
|
||||
var cursor: Cursor? = null
|
||||
|
||||
try {
|
||||
cursor = context.contentResolver.query(uri, columns, where, args, null)
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
do {
|
||||
val path = cursor.getString(cursor.getColumnIndex(MediaStore.Files.FileColumns.DATA)) ?: continue
|
||||
val noMediaFile = File(path)
|
||||
if (noMediaFile.exists())
|
||||
folders.add("${noMediaFile.parent}/")
|
||||
} while (cursor.moveToNext())
|
||||
}
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
|
||||
return folders
|
||||
}
|
||||
}
|
|
@ -4,41 +4,32 @@ import com.simplemobiletools.commons.helpers.*
|
|||
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,
|
||||
var size: Long) : Serializable, Comparable<Directory> {
|
||||
val size: Long) : Serializable, Comparable<Directory> {
|
||||
companion object {
|
||||
private val serialVersionUID = -6553345863555455L
|
||||
var sorting: Int = 0
|
||||
}
|
||||
|
||||
fun addSize(bytes: Long) {
|
||||
size += bytes
|
||||
}
|
||||
|
||||
override fun compareTo(other: Directory): Int {
|
||||
var result: Int
|
||||
if (sorting and SORT_BY_NAME != 0) {
|
||||
result = AlphanumComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
} else if (sorting and SORT_BY_SIZE != 0) {
|
||||
result = if (size == other.size)
|
||||
0
|
||||
else if (size > other.size)
|
||||
1
|
||||
else
|
||||
-1
|
||||
} else if (sorting and SORT_BY_DATE_MODIFIED != 0) {
|
||||
result = if (modified == other.modified)
|
||||
0
|
||||
else if (modified > other.modified)
|
||||
1
|
||||
else
|
||||
-1
|
||||
} else {
|
||||
result = if (taken == other.taken)
|
||||
0
|
||||
else if (taken > other.taken)
|
||||
1
|
||||
else
|
||||
-1
|
||||
when {
|
||||
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 {
|
||||
size == other.size -> 0
|
||||
size > other.size -> 1
|
||||
else -> -1
|
||||
}
|
||||
sorting and SORT_BY_DATE_MODIFIED != 0 -> result = when {
|
||||
modified == other.modified -> 0
|
||||
modified > other.modified -> 1
|
||||
else -> -1
|
||||
}
|
||||
else -> result = when {
|
||||
taken == other.taken -> 0
|
||||
taken > other.taken -> 1
|
||||
else -> -1
|
||||
}
|
||||
}
|
||||
|
||||
if (sorting and SORT_DESCENDING != 0) {
|
||||
|
|
|
@ -25,29 +25,23 @@ data class Medium(var name: String, var path: String, val video: Boolean, val mo
|
|||
|
||||
override fun compareTo(other: Medium): Int {
|
||||
var result: Int
|
||||
if (sorting and SORT_BY_NAME != 0) {
|
||||
result = AlphanumComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
} else if (sorting and SORT_BY_SIZE != 0) {
|
||||
result = if (size == other.size)
|
||||
0
|
||||
else if (size > other.size)
|
||||
1
|
||||
else
|
||||
-1
|
||||
} else if (sorting and SORT_BY_DATE_MODIFIED != 0) {
|
||||
result = if (modified == other.modified)
|
||||
0
|
||||
else if (modified > other.modified)
|
||||
1
|
||||
else
|
||||
-1
|
||||
} else {
|
||||
result = if (taken == other.taken)
|
||||
0
|
||||
else if (taken > other.taken)
|
||||
1
|
||||
else
|
||||
-1
|
||||
when {
|
||||
sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
sorting and SORT_BY_SIZE != 0 -> result = when {
|
||||
size == other.size -> 0
|
||||
size > other.size -> 1
|
||||
else -> -1
|
||||
}
|
||||
sorting and SORT_BY_DATE_MODIFIED != 0 -> result = when {
|
||||
modified == other.modified -> 0
|
||||
modified > other.modified -> 1
|
||||
else -> -1
|
||||
}
|
||||
else -> result = when {
|
||||
taken == other.taken -> 0
|
||||
taken > other.taken -> 1
|
||||
else -> -1
|
||||
}
|
||||
}
|
||||
|
||||
if (sorting and SORT_DESCENDING != 0) {
|
||||
|
|
|
@ -14,8 +14,7 @@ class MySquareImageView : ImageView {
|
|||
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||
val spec = if (isVerticalScrolling) measuredWidth else measuredHeight
|
||||
setMeasuredDimension(spec, spec)
|
||||
val spec = if (isVerticalScrolling) widthMeasureSpec else heightMeasureSpec
|
||||
super.onMeasure(spec, spec)
|
||||
}
|
||||
}
|
||||
|
|
BIN
app/src/main/res/drawable-hdpi/img_play_outline_empty.png
Normal file
BIN
app/src/main/res/drawable-hdpi/img_play_outline_empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/drawable-xhdpi/img_play_outline_empty.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/img_play_outline_empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xxhdpi/img_play_outline_empty.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/img_play_outline_empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/img_play_outline_empty.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/img_play_outline_empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
|
@ -11,6 +11,28 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/directories_empty_text_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingLeft="@dimen/big_margin"
|
||||
android:paddingRight="@dimen/big_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/no_media_with_filters"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/directories_empty_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/directories_empty_text_label"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:text="@string/change_filters_underlined"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyScalableRecyclerView
|
||||
android:id="@+id/directories_grid"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -11,6 +11,28 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/media_empty_text_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingLeft="@dimen/big_margin"
|
||||
android:paddingRight="@dimen/big_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/no_media_with_filters"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/media_empty_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/media_empty_text_label"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:text="@string/change_filters_underlined"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyScalableRecyclerView
|
||||
android:id="@+id/media_grid"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -288,6 +288,85 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_delete_empty_folders_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_delete_empty_folders"
|
||||
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/delete_empty_folders"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_allow_video_gestures_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_allow_video_gestures"
|
||||
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/allow_video_gestures"/>
|
||||
|
||||
</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
|
||||
android:id="@+id/settings_screen_rotation_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -322,40 +401,5 @@
|
|||
android:clickable="false"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_show_media_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingBottom="@dimen/bigger_margin"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/bigger_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/settings_show_media_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@+id/settings_show_media"
|
||||
android:layout_toStartOf="@+id/settings_show_media"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingRight="@dimen/medium_margin"
|
||||
android:text="@string/show_media"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/settings_show_media"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginEnd="@dimen/small_margin"
|
||||
android:layout_marginRight="@dimen/small_margin"
|
||||
android:background="@null"
|
||||
android:clickable="false"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -28,6 +28,14 @@
|
|||
android:paddingTop="@dimen/medium_margin"
|
||||
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
|
||||
android:id="@+id/sorting_dialog_radio_size"
|
||||
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>
|
|
@ -10,7 +10,7 @@
|
|||
<com.simplemobiletools.commons.views.MyScalableRecyclerView
|
||||
android:id="@+id/directories_grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none"
|
||||
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
||||
app:spanCount="@integer/directory_columns_vertical_scroll"/>
|
||||
|
|
36
app/src/main/res/layout/dialog_filter_media.xml
Normal file
36
app/src/main/res/layout/dialog_filter_media.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/filter_media_dialog_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/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/filter_media_images"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/images"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/filter_media_videos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/videos"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/filter_media_gifs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/gifs"/>
|
||||
|
||||
</LinearLayout>
|
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"?>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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_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: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>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/random_order_holder"
|
||||
android:id="@+id/include_gifs_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/include_videos_holder"
|
||||
|
@ -88,6 +88,27 @@
|
|||
android:paddingStart="@dimen/medium_margin"
|
||||
android:paddingTop="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/include_gifs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:text="@string/include_gifs"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/random_order_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/include_gifs_holder"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:paddingTop="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/random_order"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -140,5 +161,26 @@
|
|||
android:text="@string/move_backwards"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/loop_slideshow_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/move_backwards_holder"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:paddingTop="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/loop_slideshow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:text="@string/loop_slideshow"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
android:id="@+id/dir_shadow_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tmb_shadow_height"
|
||||
android:layout_alignLeft="@+id/dir_bottom_holder"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignRight="@+id/dir_bottom_holder"
|
||||
android:background="@drawable/gradient_background"/>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -80,8 +82,7 @@
|
|||
android:layout_width="@dimen/sd_card_icon_size"
|
||||
android:layout_height="@dimen/sd_card_icon_size"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignRight="@+id/dir_bottom_holder"
|
||||
android:alpha="0.8"
|
||||
android:paddingBottom="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
101
app/src/main/res/layout/directory_item_list.xml
Normal file
101
app/src/main/res/layout/directory_item_list.xml
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/dir_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingTop="@dimen/small_margin">
|
||||
|
||||
<com.simplemobiletools.gallery.views.MySquareImageView
|
||||
android:id="@+id/dir_thumbnail"
|
||||
android:layout_width="@dimen/list_view_folder_thumbnail_size"
|
||||
android:layout_height="@dimen/list_view_folder_thumbnail_size"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dir_check"
|
||||
android:layout_width="@dimen/selection_check_size"
|
||||
android:layout_height="@dimen/selection_check_size"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="@dimen/small_margin"
|
||||
android:background="@drawable/circle_background"
|
||||
android:padding="@dimen/tiny_margin"
|
||||
android:src="@drawable/ic_check"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dir_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/dir_thumbnail"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingRight="6dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dir_path"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/dir_name"
|
||||
android:layout_below="@+id/dir_name"
|
||||
android:layout_marginRight="@dimen/activity_margin"
|
||||
android:alpha="0.4"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="6dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/smaller_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/photo_cnt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@+id/dir_name"
|
||||
android:layout_toRightOf="@+id/dir_name"
|
||||
android:alpha="0.4"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/smaller_text_size"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dir_icon_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="@dimen/small_margin"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/tiny_margin">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dir_sd_card"
|
||||
android:layout_width="@dimen/sd_card_icon_size"
|
||||
android:layout_height="@dimen/sd_card_icon_size"
|
||||
android:paddingBottom="@dimen/small_margin"
|
||||
android:src="@drawable/ic_sd_card"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dir_pin"
|
||||
android:layout_width="@dimen/sd_card_icon_size"
|
||||
android:layout_height="@dimen/sd_card_icon_size"
|
||||
android:paddingBottom="@dimen/small_margin"
|
||||
android:src="@drawable/ic_pin"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dir_list_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignBottom="@+id/dir_thumbnail"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_toRightOf="@+id/dir_thumbnail"
|
||||
android:background="@drawable/divider"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/photo_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -16,4 +17,17 @@
|
|||
android:layout_height="match_parent"
|
||||
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>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/video_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -50,6 +51,19 @@
|
|||
android:textColor="@android:color/white"
|
||||
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
|
||||
android:id="@+id/video_time_holder"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
62
app/src/main/res/layout/photo_video_item_list.xml
Normal file
62
app/src/main/res/layout/photo_video_item_list.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/media_item_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingTop="@dimen/small_margin">
|
||||
|
||||
<com.simplemobiletools.gallery.views.MySquareImageView
|
||||
android:id="@+id/medium_thumbnail"
|
||||
android:layout_width="@dimen/list_view_folder_thumbnail_size"
|
||||
android:layout_height="@dimen/list_view_folder_thumbnail_size"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/medium_check"
|
||||
android:layout_width="@dimen/selection_check_size"
|
||||
android:layout_height="@dimen/selection_check_size"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="@dimen/small_margin"
|
||||
android:background="@drawable/circle_background"
|
||||
android:padding="@dimen/tiny_margin"
|
||||
android:src="@drawable/ic_check"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/photo_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@+id/medium_thumbnail"
|
||||
android:layout_alignTop="@+id/medium_thumbnail"
|
||||
android:layout_toRightOf="@+id/medium_thumbnail"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="3"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingRight="@dimen/normal_margin"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/play_outline"
|
||||
android:layout_width="@dimen/play_outline_icon_size"
|
||||
android:layout_height="@dimen/play_outline_icon_size"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="@dimen/small_margin"
|
||||
android:paddingBottom="6dp"
|
||||
android:src="@drawable/img_play_outline_empty"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dir_list_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignBottom="@+id/medium_thumbnail"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_toRightOf="@+id/medium_thumbnail"
|
||||
android:background="@drawable/divider"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/cab_confirm_selection"
|
||||
android:icon="@drawable/ic_check"
|
||||
android:title="@string/confirm_selection"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_delete"
|
||||
android:icon="@drawable/ic_delete"
|
||||
|
|
|
@ -11,6 +11,15 @@
|
|||
android:icon="@drawable/ic_camera"
|
||||
android:title="@string/open_camera"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/filter"
|
||||
android:icon="@drawable/ic_filter"
|
||||
android:title="@string/filter_media"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/change_view_type"
|
||||
android:title="@string/change_view_type"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/show_all"
|
||||
android:title="@string/show_all"
|
||||
|
@ -23,6 +32,10 @@
|
|||
android:id="@+id/stop_showing_hidden"
|
||||
android:title="@string/stop_showing_hidden"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/create_new_folder"
|
||||
android:title="@string/create_new_folder"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/increase_column_count"
|
||||
android:title="@string/increase_column_count"
|
||||
|
|
|
@ -11,6 +11,11 @@
|
|||
android:icon="@drawable/ic_label"
|
||||
android:title="@string/toggle_filename"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/filter"
|
||||
android:icon="@drawable/ic_filter"
|
||||
android:title="@string/filter_media"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/folder_view"
|
||||
android:title="@string/folder_view"
|
||||
|
@ -20,6 +25,10 @@
|
|||
android:icon="@drawable/ic_camera"
|
||||
android:title="@string/open_camera"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/change_view_type"
|
||||
android:title="@string/change_view_type"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/hide_folder"
|
||||
android:title="@string/hide_folder"
|
||||
|
|
149
app/src/main/res/values-ca/strings.xml
Normal file
149
app/src/main/res/values-ca/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="open_with">Open with</string>
|
||||
<string name="no_app_found">No valid app found</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="set_as">Set as</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>
|
||||
|
||||
<!-- 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="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>
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Nastavit jako</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>
|
||||
|
||||
<!-- 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">Tato funkce skryje složku, včetně podsložek, přidáním souboru \'.nomedia\'. Zobrazíte je zvolením možnosti \'Zobrazit skryté složky\' v nastavení. Pokračovat?</string>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</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">Zobrazit skryté média</string>
|
||||
<string name="autoplay_videos">Automaticky přehrávat videa</string>
|
||||
<string name="toggle_filename">Přepnout viditelnost názvů souborů</string>
|
||||
<string name="show_media">Zobrazit média</string>
|
||||
<string name="images">Jen obrázky</string>
|
||||
<string name="videos">Jen videa</string>
|
||||
<string name="gifs">GIFs only</string>
|
||||
<string name="images_videos_gifs">Images, videos, GIFs</string>
|
||||
<string name="images_and_videos">Obrázky i videa</string>
|
||||
<string name="loop_videos">Přehrávat videa ve smyčce</string>
|
||||
<string name="animate_gifs">Animovat náhledy souborů GIF</string>
|
||||
<string name="max_brightness">Nastavit jas obrazovky na max při zobrazení médií</string>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<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="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 -->
|
||||
|
|
|
@ -19,19 +19,28 @@
|
|||
<string name="no_camera_app_found">Keine Kamera-App gefunden</string>
|
||||
<string name="increase_column_count">Kacheln verkleinern</string>
|
||||
<string name="reduce_column_count">Kacheln vergrößern</string>
|
||||
<string name="change_cover_image">Cover-Bild ändern</string>
|
||||
<string name="change_cover_image">Coverbild ändern</string>
|
||||
<string name="select_photo">Auswählen</string>
|
||||
<string name="use_default">Standard</string>
|
||||
<string name="set_as">Festlegen als</string>
|
||||
<string name="volume">Lautstärke</string>
|
||||
<string name="brightness">Helligkeit</string>
|
||||
<string name="do_not_ask_again">Nicht erneut fragen (in dieser Session)</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Filter</string>
|
||||
<string name="images">Bilder</string>
|
||||
<string name="videos">Videos</string>
|
||||
<string name="gifs">GIFs</string>
|
||||
<string name="no_media_with_filters">Keine Medien für die ausgewählten Filter gefunden</string>
|
||||
<string name="change_filters_underlined"><u>Filter ändern</u></string>
|
||||
|
||||
<!-- 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="excluded_folders">Ausgeblendete Ordner</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="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>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Diashow</string>
|
||||
<string name="interval">Intervall (Sekunden):</string>
|
||||
<string name="include_photos">Bilder/GIFs verwenden</string>
|
||||
<string name="include_photos">Bilder verwenden</string>
|
||||
<string name="include_videos">Videos verwenden</string>
|
||||
<string name="include_gifs">GIFs verwenden</string>
|
||||
<string name="random_order">Zufällige Reihenfolge</string>
|
||||
<string name="use_fade">Übergänge animieren</string>
|
||||
<string name="move_backwards">Rückwärts abspielen</string>
|
||||
<string name="loop_slideshow">Endlos abspielen</string>
|
||||
<string name="slideshow_ended">Diashow beendet</string>
|
||||
<string name="no_media_for_slideshow">Keine Medien für Diashow gefunden</string>
|
||||
|
||||
<!-- View types -->
|
||||
<string name="change_view_type">Darstellung ändern</string>
|
||||
<string name="grid">Gitter</string>
|
||||
<string name="list">Liste</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="show_hidden_media">Versteckte Ordner zeigen</string>
|
||||
<string name="autoplay_videos">Videos automatisch abspielen</string>
|
||||
<string name="toggle_filename">Beschriftungen ein/aus</string>
|
||||
<string name="show_media">Medien auswählen</string>
|
||||
<string name="images">Nur Bilder</string>
|
||||
<string name="videos">Nur Videos</string>
|
||||
<string name="gifs">Nur GIFs</string>
|
||||
<string name="images_videos_gifs">Bilder, Videos und GIFs</string>
|
||||
<string name="images_and_videos">Bilder und Videos</string>
|
||||
<string name="loop_videos">Videos in Endlosschleife spielen</string>
|
||||
<string name="animate_gifs">Kacheln von GIFs animieren</string>
|
||||
<string name="max_brightness">Helligkeit beim Betrachten maximieren</string>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<string name="dark_background_at_fullscreen">Schwarzer Hintergrund im Vollbild</string>
|
||||
<string name="scroll_thumbnails_horizontally">Kacheln horizontal scrollen</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="allow_video_gestures">Gesten für Videolautstärke/Helligkeit</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 -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Establecer como</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>
|
||||
|
||||
<!-- 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">Esta función oculta la carpeta agregando un archivo \'.nomedia\' en ella, y ocultará también las subcarpetas. Puede mostrarlas cambiando la opción \'Mostrar carpetas ocultas\' en los Ajustes. ¿Continuar?</string>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</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">Mostrar carpetas ocultas</string>
|
||||
<string name="autoplay_videos">Reproducir vídeos automáticamente</string>
|
||||
<string name="toggle_filename">Cambiar la visibilidad del nombre de archivo</string>
|
||||
<string name="show_media">Mostrar multimedia</string>
|
||||
<string name="images">Solo imágenes</string>
|
||||
<string name="videos">Solo vídeos</string>
|
||||
<string name="gifs">solo GIFs</string>
|
||||
<string name="images_videos_gifs">Imágenes, vídeos, GIFs</string>
|
||||
<string name="images_and_videos">Imágenes y vídeos</string>
|
||||
<string name="loop_videos">Reproducción continua de vídeos</string>
|
||||
<string name="animate_gifs">Animar las miniaturas de GIFs</string>
|
||||
<string name="max_brightness">Brillo máximo cuando se muestra multimedia</string>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<string name="dark_background_at_fullscreen">Utilizar siempre fondo oscuro en pantalla completa</string>
|
||||
<string name="scroll_thumbnails_horizontally">Desplazar miniaturas horizontalmente</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="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</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 -->
|
||||
<!-- 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="open_with">Avaa</string>
|
||||
<string name="no_app_found">Sovelluksia ei löydetty</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="set_as">Aseta</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>
|
||||
|
||||
<!-- 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="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>
|
|
@ -7,7 +7,7 @@
|
|||
<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="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="show_all">Afficher le contenu de tous les dossiers</string>
|
||||
<string name="all_folders">Tous les dossiers</string>
|
||||
|
@ -15,16 +15,25 @@
|
|||
<string name="other_folder">Autre dossier</string>
|
||||
<string name="show_on_map">Afficher sur la carte</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_camera_app_found">Aucune application d\\appareil photo 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="increase_column_count">Augmenter 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="use_default">Use default</string>
|
||||
<string name="set_as">Set as</string>
|
||||
<string name="use_default">Utiliser par défaut</string>
|
||||
<string name="set_as">Définir comme</string>
|
||||
<string name="volume">Volume</string>
|
||||
<string name="brightness">Luminosité</string>
|
||||
<string name="do_not_ask_again">Ne pas redemander pour cette session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Filtrer les médias</string>
|
||||
<string name="images">Images</string>
|
||||
<string name="videos">Vidéos</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="change_filters_underlined"><u>Changer les filtres</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">Cette option masque le dossier en ajoutant un fichier \'.nomedia\' à l\'intérieur, cela masquera aussi tous les sous-dossiers. Vous pouvez les voir en modifiant l\'option \'Afficher les dossiers cachés\' dans les Paramètres. Continuer ?</string>
|
||||
|
@ -41,7 +50,7 @@
|
|||
<string name="include_folders">Dossiers inclus</string>
|
||||
<string name="manage_included_folders">Gérer les dossiers inclus</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 -->
|
||||
<string name="resize">Redimensionner</string>
|
||||
|
@ -49,7 +58,7 @@
|
|||
<string name="width">Largeur</string>
|
||||
<string name="height">Hauteur</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 -->
|
||||
<string name="editor">Éditeur</string>
|
||||
|
@ -78,47 +87,60 @@
|
|||
<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="wallpaper_set_successfully">Fond d\'écran défini avec succès</string>
|
||||
<string name="portrait_aspect_ratio">Ratio aspect Portrait</string>
|
||||
<string name="landscape_aspect_ratio">Ratio aspect Paysage</string>
|
||||
<string name="portrait_aspect_ratio">Ratio d\'aspect portrait</string>
|
||||
<string name="landscape_aspect_ratio">Ratio d\'aspect paysage</string>
|
||||
|
||||
<!-- Slideshow -->
|
||||
<string name="slideshow">Diaporama</string>
|
||||
<string name="interval">Intervalle (secondes):</string>
|
||||
<string name="include_photos">Inclure photos et GIFs</string>
|
||||
<string name="interval">Intervalle (secondes) :</string>
|
||||
<string name="include_photos">Inclure photos</string>
|
||||
<string name="include_videos">Inclure vidéos</string>
|
||||
<string name="include_gifs">Inclure GIF</string>
|
||||
<string name="random_order">Ordre aléatoire</string>
|
||||
<string name="use_fade">Utiliser un fondu</string>
|
||||
<string name="move_backwards">Move backwards</string>
|
||||
<string name="move_backwards">Revenir en arrière</string>
|
||||
<string name="loop_slideshow">Diaporama en boucle</string>
|
||||
<string name="slideshow_ended">Diaporama terminé</string>
|
||||
<string name="no_media_for_slideshow">No media for the slideshow have been found</string>
|
||||
<string name="no_media_for_slideshow">Aucun média trouvé pour le diaporama</string>
|
||||
|
||||
<!-- View types -->
|
||||
<string name="change_view_type">Changer le type de vue</string>
|
||||
<string name="grid">Grille</string>
|
||||
<string name="list">Liste</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="show_hidden_media">Afficher les dossiers cachés</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="show_media">Afficher les médias</string>
|
||||
<string name="images">Seulement les images</string>
|
||||
<string name="videos">Vidéos uniquement</string>
|
||||
<string name="gifs">GIFs seulement</string>
|
||||
<string name="images_videos_gifs">Images, vidéos, GIFs</string>
|
||||
<string name="images_and_videos">Images et vidéos</string>
|
||||
<string name="loop_videos">Tourner en boucle les vidéos</string>
|
||||
<string name="animate_gifs">GIFs animés sur les miniatures</string>
|
||||
<string name="loop_videos">Lire en boucle les vidéos</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="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_system_setting">Paramètres système</string>
|
||||
<string name="screen_rotation_device_rotation">Rotation de l\'appareil</string>
|
||||
<string name="screen_rotation_aspect_ratio">Ratio d\'aspect</string>
|
||||
<string name="dark_background_at_fullscreen">Dark background at fullscreen media</string>
|
||||
<string name="scroll_thumbnails_horizontally">Défilement des mignatures horizontalement</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</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 miniatures horizontalement</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="allow_video_gestures">Permettre le contrôle du volume vidéo et de la luminosité avec des gestes verticaux</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 -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Un album pour visionner photos et vidéos sans publicité.</string>
|
||||
<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. 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. L\'application ne contient ni de publicité ni d\'autorisation inutile. Elle est totalement OpenSource et est aussi fournie avec un thème sombre. 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 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.
|
||||
|
||||
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 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
|
||||
</string>
|
||||
|
||||
<!--
|
||||
Haven't found some strings? There's more at
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Set as</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>
|
||||
|
||||
<!-- 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>
|
||||
|
@ -41,7 +50,7 @@
|
|||
<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.</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>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</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="show_media">Show media</string>
|
||||
<string name="images">Images only</string>
|
||||
<string name="videos">Videos only</string>
|
||||
<string name="gifs">GIFs only</string>
|
||||
<string name="images_videos_gifs">Images, videos, GIFs</string>
|
||||
<string name="images_and_videos">Images and videos</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>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<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="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 -->
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Imposta come</string>
|
||||
<string name="volume">Volume</string>
|
||||
<string name="brightness">Luminosità</string>
|
||||
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Filtra i media</string>
|
||||
<string name="images">Immagini</string>
|
||||
<string name="videos">Video</string>
|
||||
<string name="gifs">GIF</string>
|
||||
<string name="no_media_with_filters">Nessun file trovato per il filtro selezionato.</string>
|
||||
<string name="change_filters_underlined"><u>Cambia filtro</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">Questa funzione nasconde la cartella aggiungendo un file \'.nomedia\' all\'interno, nasconderà anche tutte le sottocartelle. Puoi vederle attivando l\'opzione \'Mostra cartelle nascoste\' nelle impostazioni. Continuare?</string>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Presentazione</string>
|
||||
<string name="interval">Intervallo (secondi):</string>
|
||||
<string name="include_photos">Includi foto e GIF</string>
|
||||
<string name="include_photos">Includi foto</string>
|
||||
<string name="include_videos">Includi video</string>
|
||||
<string name="include_gifs">Includi GIF</string>
|
||||
<string name="random_order">Ordine sparso</string>
|
||||
<string name="use_fade">Usa animazioni a dissolvenza</string>
|
||||
<string name="move_backwards">Scorri al contrario</string>
|
||||
<string name="loop_slideshow">Ripeti presentazione</string>
|
||||
<string name="slideshow_ended">La presentazione è terminata</string>
|
||||
<string name="no_media_for_slideshow">Nessun media trovato per la presentazione</string>
|
||||
|
||||
<!-- View types -->
|
||||
<string name="change_view_type">Cambia modalità visualizzazione</string>
|
||||
<string name="grid">Griglia</string>
|
||||
<string name="list">Elenco</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="show_hidden_media">Mostra cartelle nascoste</string>
|
||||
<string name="autoplay_videos">Riproduci video automaticamente</string>
|
||||
<string name="toggle_filename">Visibilità nome del file</string>
|
||||
<string name="show_media">Mostra tipo di media</string>
|
||||
<string name="images">Solo immagini</string>
|
||||
<string name="videos">Solo video</string>
|
||||
<string name="gifs">Solo GIF</string>
|
||||
<string name="images_videos_gifs">Immagini, video, GIF</string>
|
||||
<string name="images_and_videos">Immagini e video</string>
|
||||
<string name="loop_videos">Ripeti i video</string>
|
||||
<string name="animate_gifs">Anima le GIF in miniatura</string>
|
||||
<string name="max_brightness">Luminosità max durante visualizzazione</string>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<string name="dark_background_at_fullscreen">Sfondo scuro a schermo intero</string>
|
||||
<string name="scroll_thumbnails_horizontally">Scorri miniature orizzontalmente</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="allow_video_gestures">Gestisci il volume e la luminosità dei video con gesti verticali</string>
|
||||
<string name="replace_share_with_rotate">Sostituisci Condividi con Ruota a schermo intero</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 -->
|
||||
|
|
|
@ -4,116 +4,130 @@
|
|||
<string name="app_launcher_name">ギャラリー</string>
|
||||
<string name="edit">編集</string>
|
||||
<string name="open_camera">カメラを開く</string>
|
||||
<string name="open_with">…で開く</string>
|
||||
<string name="open_with">別のアプリで開く</string>
|
||||
<string name="no_app_found">有効なアプリが見つかりません</string>
|
||||
<string name="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 media</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="set_as">Set as</string>
|
||||
<string name="volume">Volume</string>
|
||||
<string name="brightness">Brightness</string>
|
||||
<string name="pin_folder">フォルダーをピン留めする</string>
|
||||
<string name="unpin_folder">フォルダーのピン留めを外す</string>
|
||||
<string name="show_all">全てを表示</string>
|
||||
<string name="all_folders">すべてのフォルダー</string>
|
||||
<string name="folder_view">フォルダーを選択する</string>
|
||||
<string name="other_folder">その他のフォルダー</string>
|
||||
<string name="show_on_map">地図で表示</string>
|
||||
<string name="unknown_location">位置情報がありません</string>
|
||||
<string name="no_map_application">地図アプリが見つかりません</string>
|
||||
<string name="no_camera_app_found">カメラアプリが見つかりません</string>
|
||||
<string name="increase_column_count">列数を増やす</string>
|
||||
<string name="reduce_column_count">列数を減らす</string>
|
||||
<string name="change_cover_image">カバー画像を変更</string>
|
||||
<string name="select_photo">写真を選択</string>
|
||||
<string name="use_default">デフォルトに戻す</string>
|
||||
<string name="set_as">他で使う</string>
|
||||
<string name="volume">音量</string>
|
||||
<string name="brightness">明るさ</string>
|
||||
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">表示メディア種</string>
|
||||
<string name="images">画像</string>
|
||||
<string name="videos">ビデオ</string>
|
||||
<string name="gifs">GIF</string>
|
||||
<string name="no_media_with_filters">絞り込み条件に該当するメディアがありません。</string>
|
||||
<string name="change_filters_underlined"><u>絞り込み条件を変更</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>
|
||||
<string name="hide_folder_description">対象のフォルダーに「.nomedia」というファイルを作成し、フォルダーを非表示にします。そのフォルダー以下のすべてのサブフォルダーも、同様に非表示となります。非表示となったフォルダーを見るには、「設定」の中にある「非表示のフォルダーを表示」オプションを切り替えてください。このフォルダーを非表示にしますか?</string>
|
||||
<string name="exclude">除外する</string>
|
||||
<string name="excluded_folders">除外フォルダー</string>
|
||||
<string name="manage_excluded_folders">除外フォルダーを管理</string>
|
||||
<string name="exclude_folder_description">選択したフォルダーとそのサブフォルダーを、Simple Galleyの一覧から除外します。除外したフォルダーは「設定」で管理できます。</string>
|
||||
<string name="exclude_folder_parent">親フォルダーを選択して除外することもできます。</string>
|
||||
<string name="excluded_activity_placeholder">フォルダーを除外すると、サブフォルダーも含めSimple Galleyの一覧から除外します。他のアプリでは引き続き表示されます。\\n\\n他のアプリでも非表示にしたい場合は、「非表示」機能を使用してください。</string>
|
||||
<string name="remove_all">すべて解除</string>
|
||||
<string name="remove_all_description">除外するフォルダーの登録をすべて解除しますか? フォルダー自体は削除されません。</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.</string>
|
||||
<string name="include_folders">追加フォルダー</string>
|
||||
<string name="manage_included_folders">追加フォルダーを管理</string>
|
||||
<string name="add_folder">フォルダーを追加</string>
|
||||
<string name="included_activity_placeholder">メディアを含んでいるフォルダーがアプリから認識されていない場合は、手動で追加できます。</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>
|
||||
<string name="resize">リサイズ</string>
|
||||
<string name="resize_and_save">選択領域をリサイズして保存</string>
|
||||
<string name="width">幅</string>
|
||||
<string name="height">高さ</string>
|
||||
<string name="keep_aspect_ratio">縦横比を固定</string>
|
||||
<string name="invalid_values">解像度を正しく入力してください</string>
|
||||
|
||||
<!-- Editor -->
|
||||
<string name="editor">エディター</string>
|
||||
<string name="save">保存</string>
|
||||
<string name="rotate">回転</string>
|
||||
<string name="path">Path</string>
|
||||
<string name="path">パス</string>
|
||||
<string name="invalid_image_path">無効な画像パス</string>
|
||||
<string name="image_editing_failed">画像の編集に失敗しました</string>
|
||||
<string name="edit_image_with">画像を編集:</string>
|
||||
<string name="no_editor_found">画像エディターが見つかりません</string>
|
||||
<string name="unknown_file_location">ファイルの場所が不明です</string>
|
||||
<string name="error_saving_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>
|
||||
<string name="rotate_left">左に回転</string>
|
||||
<string name="rotate_right">右に回転</string>
|
||||
<string name="rotate_one_eighty">180º回転</string>
|
||||
<string name="flip">反転</string>
|
||||
<string name="flip_horizontally">水平方向に反転</string>
|
||||
<string name="flip_vertically">垂直方向に反転</string>
|
||||
<string name="edit_with">他のアプリで編集</string>
|
||||
|
||||
<!-- Set wallpaper -->
|
||||
<string name="simple_wallpaper">シンプル壁紙</string>
|
||||
<string name="set_as_wallpaper">壁紙として設定</string>
|
||||
<string name="set_as_wallpaper_failed">壁紙としての設定に失敗しました</string>
|
||||
<string name="set_as_wallpaper_with">壁紙として設定:</string>
|
||||
<string name="set_as_wallpaper">壁紙に設定</string>
|
||||
<string name="set_as_wallpaper_failed">壁紙の設定に失敗しました</string>
|
||||
<string name="set_as_wallpaper_with">壁紙に設定:</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="portrait_aspect_ratio">Portrait aspect ratio</string>
|
||||
<string name="landscape_aspect_ratio">Landscape aspect ratio</string>
|
||||
<string name="portrait_aspect_ratio">縦向きの縦横比</string>
|
||||
<string name="landscape_aspect_ratio">横向きの縦横比</string>
|
||||
|
||||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</string>
|
||||
<string name="include_videos">Include videos</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="slideshow_ended">The slideshow ended</string>
|
||||
<string name="no_media_for_slideshow">No media for the slideshow have been found</string>
|
||||
<string name="slideshow">スライドショー</string>
|
||||
<string name="interval">間隔 (秒):</string>
|
||||
<string name="include_photos">写真を含める</string>
|
||||
<string name="include_videos">ビデオを含める</string>
|
||||
<string name="include_gifs">GIFを含める</string>
|
||||
<string name="random_order">ランダムな順序</string>
|
||||
<string name="use_fade">フェードアニメーションを使用する</string>
|
||||
<string name="move_backwards">逆方向に進む</string>
|
||||
<string name="loop_slideshow">スライドショーをリピート再生する</string>
|
||||
<string name="slideshow_ended">スライドショーが終了しました</string>
|
||||
<string name="no_media_for_slideshow">スライドショーに表示するメディアがありません</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">非表示フォルダーを表示</string>
|
||||
<string name="autoplay_videos">自動的にビデオを再生</string>
|
||||
<string name="autoplay_videos">ビデオを自動再生する</string>
|
||||
<string name="toggle_filename">ファイル名の表示を切り替え</string>
|
||||
<string name="show_media">Show media</string>
|
||||
<string name="images">Images only</string>
|
||||
<string name="videos">Videos only</string>
|
||||
<string name="gifs">GIFs only</string>
|
||||
<string name="images_videos_gifs">Images, videos, GIFs</string>
|
||||
<string name="images_and_videos">Images and videos</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="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
<string name="loop_videos">ビデオをリピート再生する</string>
|
||||
<string name="animate_gifs">GIF画像のサムネイルをアニメーション表示する</string>
|
||||
<string name="max_brightness">メディア再生時に明るさを最大にする</string>
|
||||
<string name="crop_thumbnails">サムネイルを正方形に切り取る</string>
|
||||
<string name="screen_rotation_by">メディア再生時のフルスクリーン表示切り替え</string>
|
||||
<string name="screen_rotation_system_setting">システム設定に従う</string>
|
||||
<string name="screen_rotation_device_rotation">端末の向きに従う</string>
|
||||
<string name="screen_rotation_aspect_ratio">メディアの縦横比に従う</string>
|
||||
<string name="dark_background_at_fullscreen">黒背景でフルスクリーン表示</string>
|
||||
<string name="scroll_thumbnails_horizontally">サムネイル画面を横方向にスクロール</string>
|
||||
<string name="hide_system_ui_at_fullscreen">フルスクリーン時にシステムUIを非表示にする</string>
|
||||
<string name="delete_empty_folders">メディアの削除後にフォルダーが空になった場合、そのフォルダーを削除する</string>
|
||||
<string name="allow_video_gestures">ビデオ再生中に、音量と明るさを縦方向のジェスチャーで変更する</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 -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Ustaw jako</string>
|
||||
<string name="volume">Głośność</string>
|
||||
<string name="brightness">Jasność</string>
|
||||
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Filtruj multimedia</string>
|
||||
<string name="images">Obrazy</string>
|
||||
<string name="videos">Filmy</string>
|
||||
<string name="gifs">GIFy</string>
|
||||
<string name="no_media_with_filters">Nie znalazłem multimediów z wybranymi filtrami.</string>
|
||||
<string name="change_filters_underlined"><u>Zmień filtry</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">Ta funkcja ukrywa foldery dodając do nich pusty plik .nomedia. Aby móc je zobaczyć, należy włączyć opcję \'Pokazuj ukryte foldery\' w ustawieniach. Kontyntynuować?</string>
|
||||
|
@ -49,7 +58,7 @@
|
|||
<string name="width">Szerokość</string>
|
||||
<string name="height">Wysokość</string>
|
||||
<string name="keep_aspect_ratio">Zachowaj proporcje</string>
|
||||
<string name="invalid_values">Wpisz poprawną rozdzielczość</string>
|
||||
<string name="invalid_values">Podaj poprawną rozdzielczość</string>
|
||||
|
||||
<!-- Editor -->
|
||||
<string name="editor">Edycja</string>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Pokaz slajdów</string>
|
||||
<string name="interval">Przedział (sekundy):</string>
|
||||
<string name="include_photos">Dołączaj zdjęcia i GIFy</string>
|
||||
<string name="include_photos">Dołączaj zdjęcia</string>
|
||||
<string name="include_videos">Dołączaj filmy</string>
|
||||
<string name="include_gifs">Dołączaj GIFy</string>
|
||||
<string name="random_order">Losowa kolejność</string>
|
||||
<string name="use_fade">Używaj płynnych przejść</string>
|
||||
<string name="move_backwards">Odwrotna kolejność</string>
|
||||
<string name="loop_slideshow">Zapętlaj</string>
|
||||
<string name="slideshow_ended">Pokaz slajdów zakończony</string>
|
||||
<string name="no_media_for_slideshow">Nie znalazłem multimediów do pokazu slajdów</string>
|
||||
|
||||
<!-- View types -->
|
||||
<string name="change_view_type">Zmień typ widoku</string>
|
||||
<string name="grid">Siatka</string>
|
||||
<string name="list">Lista</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="show_hidden_media">Pokazuj ukryte foldery</string>
|
||||
<string name="autoplay_videos">Odtwarzaj filmy automatycznie</string>
|
||||
<string name="toggle_filename">Pokazuj / ukrywaj nazwy plików</string>
|
||||
<string name="show_media">Pokazywane typy multimediów</string>
|
||||
<string name="images">Tylko obrazy</string>
|
||||
<string name="videos">Tylko filmy</string>
|
||||
<string name="gifs">Tylko GIFy</string>
|
||||
<string name="images_videos_gifs">Obrazy, filmy i GIFy</string>
|
||||
<string name="images_and_videos">Obrazy i filmy</string>
|
||||
<string name="loop_videos">Zapętlaj odtwarzanie filmów</string>
|
||||
<string name="animate_gifs">Animowane miniatury GIFów</string>
|
||||
<string name="max_brightness">Maksymalna jasność podczas wyświetlania multimediów</string>
|
||||
|
@ -113,13 +123,17 @@
|
|||
<string name="dark_background_at_fullscreen">Czarne tło przy podglądzie pełnoekranowym</string>
|
||||
<string name="scroll_thumbnails_horizontally">Przewijaj miniatury poziomo</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="allow_video_gestures">Zezwalaj na kontrolę jasności i głośności filmów pionowymi gestami</string>
|
||||
<string name="replace_share_with_rotate">Zamień funkcję udostępniania na obracanie w menu pełnoekranowym</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">Darmowa galeria bez reklam do przeglądania obrazów i filmów.</string>
|
||||
<string name="app_long_description">
|
||||
Prosta aplikacja galerii do oglądania obrazów i filmów. Pliki mogą być sortowane według daty, rozmiaru i nazwy, zarówno w porządku rosnącym jak i malejącym. W zależności od wielkości ekranu wyświetlane mogą być w wielu kolumnach. Liczbę kolumn można zmieniać za pomocą gestów. Zdjęcia mogą być powiększane, przycinane, obracane lub ustawiane jako tapeta bezpośrednio z poziomu aplikacji. Kolory aplikacji można dowolnie ustawiać.
|
||||
Prosta aplikacja galerii do oglądania obrazów i filmów. Pliki mogą być sortowane według daty, rozmiaru i nazwy, zarówno w porządku rosnącym, jak i malejącym. W zależności od wielkości ekranu wyświetlane mogą być w wielu kolumnach. Liczbę kolumn można zmieniać za pomocą gestów. Zdjęcia mogą być powiększane, przycinane, obracane lub ustawiane jako tapeta bezpośrednio z poziomu aplikacji. Kolory aplikacji można dowolnie ustawiać.
|
||||
|
||||
Aplikacja nie zawiera żadnych reklam ani niepotrzebnych uprawnień. Jest też w pełni otawrtoźrodłowa.
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
<string name="edit">Editar</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="no_app_found">Nenhum aplicativo encontrado</string>
|
||||
<string name="hidden">(oculto)</string>
|
||||
<string name="pin_folder">Fixar pasta</string>
|
||||
<string name="unpin_folder">Desfixar pasta</string>
|
||||
|
@ -26,6 +25,15 @@
|
|||
<string name="set_as">Set as</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>
|
||||
|
||||
<!-- 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">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>
|
||||
|
@ -85,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</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">Mostrar pastas ocultas</string>
|
||||
<string name="autoplay_videos">Reproduzir vídeos automaticamente</string>
|
||||
<string name="toggle_filename">Mostrar/ocultar nome do arquivo</string>
|
||||
<string name="show_media">Mostrar mídia</string>
|
||||
<string name="images">Apenas imagens</string>
|
||||
<string name="videos">Apenas vídeos</string>
|
||||
<string name="gifs">Apenas GIFS</string>
|
||||
<string name="images_videos_gifs">Imagens, vídeos, GIFs</string>
|
||||
<string name="images_and_videos">Imagens e vídeos</string>
|
||||
<string name="loop_videos">Reproduzir vídeos em ciclo</string>
|
||||
<string name="animate_gifs">Animação de GIFs nas miniaturas</string>
|
||||
<string name="max_brightness">Brilho máximo ao visualizar mídia</string>
|
||||
|
@ -114,7 +123,11 @@
|
|||
<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="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="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 -->
|
||||
|
|
|
@ -19,21 +19,30 @@
|
|||
<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="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="use_default">Predefinição</string>
|
||||
<string name="set_as">Definir como</string>
|
||||
<string name="volume">Volume</string>
|
||||
<string name="brightness">Brilho</string>
|
||||
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Filtrar multimédia</string>
|
||||
<string name="images">Imagens</string>
|
||||
<string name="videos">Vídeos</string>
|
||||
<string name="gifs">GIFs</string>
|
||||
<string name="no_media_with_filters">Não foram encontrados ficheiros que cumpram os requisitos.</string>
|
||||
<string name="change_filters_underlined"><u>Alterar filtros</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">Esta opção oculta uma pasta com a adição de um ficheiro \'.nomedia\' na pasta, e irá ocultar todas as subpastas existentes. Pode ver as pastas com a opção \'Mostrar pastas ocultas\'. Continuar?</string>
|
||||
<string name="exclude">Exclusão</string>
|
||||
<string name="excluded_folders">Pastas excluídas</string>
|
||||
<string name="manage_excluded_folders">Gerir pastas excluídas</string>
|
||||
<string name="exclude_folder_description">Esta ação apenas exclui as pastas selecionadas da lista de pastas desta aplicação. Pode gerir as pastas excuídas nas Definições.</string>
|
||||
<string name="exclude_folder_description">Esta ação apenas exclui as pastas selecionadas da lista de pastas desta aplicação. Pode gerir as pastas excluídas nas Definições.</string>
|
||||
<string name="exclude_folder_parent">Excluir antes a pasta superior?</string>
|
||||
<string name="excluded_activity_placeholder">A exlusão de uma pasta apenas oculta o seu conteúdo do Simple Gallery uma vez que as outras aplicações continuarão a poder aceder-lhes.\\n\\nSe quiser ocultar também das outras aplicações, utilize a função Ocultar.</string>
|
||||
<string name="excluded_activity_placeholder">A exclusão de uma pasta apenas oculta o seu conteúdo do Simple Gallery porque as outras aplicações continuarão a poder aceder-lhes.\\n\\nSe quiser ocultar também das outras aplicações, utilize a função Ocultar.</string>
|
||||
<string name="remove_all">Remover todas</string>
|
||||
<string name="remove_all_description">Remover todas as pastas de lista de exclusões? Esta ação não apaga as pastas.</string>
|
||||
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Apresentação</string>
|
||||
<string name="interval">Intervalo (segundos):</string>
|
||||
<string name="include_photos">Incluir fotos e GIFs</string>
|
||||
<string name="include_photos">Incluir fotos</string>
|
||||
<string name="include_videos">Incluir vídeos</string>
|
||||
<string name="include_gifs">Incluir GIFs</string>
|
||||
<string name="random_order">Ordem aleatória</string>
|
||||
<string name="use_fade">Usar animações</string>
|
||||
<string name="move_backwards">Mover para trás</string>
|
||||
<string name="loop_slideshow">Apresentação em ciclo</string>
|
||||
<string name="slideshow_ended">Apresentação terminada</string>
|
||||
<string name="no_media_for_slideshow">Não foram encontrados ficheiros para a apresentação</string>
|
||||
|
||||
<!-- View types -->
|
||||
<string name="change_view_type">Tipo de exibição</string>
|
||||
<string name="grid">Grelha</string>
|
||||
<string name="list">Lista</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
||||
<string name="autoplay_videos">Reproduzir vídeos automaticamente</string>
|
||||
<string name="toggle_filename">Mostrar/ocultar nome do ficheiro</string>
|
||||
<string name="show_media">Mostrar multimédia</string>
|
||||
<string name="images">Apenas imagens</string>
|
||||
<string name="videos">Apenas vídeos</string>
|
||||
<string name="gifs">Apenas GIFs</string>
|
||||
<string name="images_videos_gifs">Imagens, vídeos e GIFs</string>
|
||||
<string name="images_and_videos">Imagens e vídeos</string>
|
||||
<string name="loop_videos">Vídeos em ciclo</string>
|
||||
<string name="animate_gifs">Animação de GIFs nas miniaturas</string>
|
||||
<string name="max_brightness">Brilho máximo permitido</string>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<string name="dark_background_at_fullscreen">Usar sempre um fundo escuro se em ecrã completo</string>
|
||||
<string name="scroll_thumbnails_horizontally">Deslocação horizontal de miniaturas</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="allow_video_gestures">Permitir controlo do volume e brilho dos vídeos através de gestos verticais</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">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 -->
|
||||
|
|
|
@ -19,29 +19,38 @@
|
|||
<string name="no_camera_app_found">Не найдено приложения камеры</string>
|
||||
<string name="increase_column_count">Добавить 1 столбец</string>
|
||||
<string name="reduce_column_count">Убрать 1 столбец</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="set_as">Set as</string>
|
||||
<string name="volume">Volume</string>
|
||||
<string name="brightness">Brightness</string>
|
||||
<string name="change_cover_image">Изменить обложку</string>
|
||||
<string name="select_photo">Выбрать изображение</string>
|
||||
<string name="use_default">Использовать по умолчанию</string>
|
||||
<string name="set_as">Установить как…</string>
|
||||
<string name="volume">Громкость</string>
|
||||
<string name="brightness">Яркость</string>
|
||||
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Фильтр медиа</string>
|
||||
<string name="images">Изображения</string>
|
||||
<string name="videos">Видео</string>
|
||||
<string name="gifs">GIF</string>
|
||||
<string name="no_media_with_filters">При заданных фильтрах медиафайлы не найдены.</string>
|
||||
<string name="change_filters_underlined"><u>Изменить фильтры</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">Эта опция скрывает папку, добавляя в неё файл \'.nomedia\'; будут скрыты все подпапки. Можно показывать их, переключая \'Показать скрытые папки\' в настройках. Продолжить?</string>
|
||||
<string name="hide_folder_description">Эта функция скрывает папку, добавляя в неё файл \'.nomedia\'; будут скрыты все подпапки. Можно показывать их, переключая \'Показывать скрытые папки\' в настройках. Продолжить?</string>
|
||||
<string name="exclude">Исключить</string>
|
||||
<string name="excluded_folders">Исключённые папки</string>
|
||||
<string name="manage_excluded_folders">Управление исключёнными папками</string>
|
||||
<string name="exclude_folder_description">Эта опция исключит выбранные папки вместе с подпапками только для Simple Gallery. Можно управлять исключёнными папками из настроек.</string>
|
||||
<string name="exclude_folder_description">Эта функция исключит выбранные папки вместе с подпапками только для Simple Gallery. Можно управлять исключёнными папками из настроек.</string>
|
||||
<string name="exclude_folder_parent">Исключить только родительский каталог?</string>
|
||||
<string name="excluded_activity_placeholder">Исключая папки, вы сделаете их скрытыми вместе с подпапками в Simple Gallery, но они будут видны в других приложениях. Если вы хотите скрыть их в других приложениях, используйте функцию Скрыть. </string>
|
||||
<string name="remove_all">Удалить всё</string>
|
||||
<string name="remove_all_description">Очистить список исключённых? Сами папки не будут удалены.</string>
|
||||
|
||||
<!-- Include folders -->
|
||||
<string name="include_folders">Включенные папки</string>
|
||||
<string name="manage_included_folders">Управление включенными папками</string>
|
||||
<string name="include_folders">Включённые папки</string>
|
||||
<string name="manage_included_folders">Управление включёнными папками</string>
|
||||
<string name="add_folder">Добавление папки</string>
|
||||
<string name="included_activity_placeholder">Если у вас есть папки содержащие медиа, но не распознанные Simple Gallery. Вы можете добавить их вручную.</string>
|
||||
<string name="included_activity_placeholder">Если у вас есть папки, содержащие медиафайлы, но не распознанные Simple Gallery. Вы можете добавить их вручную.</string>
|
||||
|
||||
<!-- Resizing -->
|
||||
<string name="resize">Изменить размер</string>
|
||||
|
@ -64,11 +73,11 @@
|
|||
<string name="error_saving_file">Не удалось перезаписать исходный файл</string>
|
||||
<string name="rotate_left">Повернуть влево</string>
|
||||
<string name="rotate_right">Повернуть вправо</string>
|
||||
<string name="rotate_one_eighty">Перевернуть на 180º</string>
|
||||
<string name="rotate_one_eighty">Перевернуть на 180°</string>
|
||||
<string name="flip">Отразить</string>
|
||||
<string name="flip_horizontally">По горизонтали</string>
|
||||
<string name="flip_vertically">По вертикали</string>
|
||||
<string name="edit_with">Edit with</string>
|
||||
<string name="edit_with">Редактировать в</string>
|
||||
|
||||
<!-- Set wallpaper -->
|
||||
<string name="simple_wallpaper">Простые обои</string>
|
||||
|
@ -76,44 +85,49 @@
|
|||
<string name="set_as_wallpaper_failed">Установить не удалось</string>
|
||||
<string name="set_as_wallpaper_with">Установить в качестве обоев в:</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="portrait_aspect_ratio">Формат изображения</string>
|
||||
<string name="landscape_aspect_ratio">Пейзажное соотношение сторон</string>
|
||||
|
||||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</string>
|
||||
<string name="include_videos">Include videos</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="slideshow_ended">The slideshow ended</string>
|
||||
<string name="no_media_for_slideshow">No media for the slideshow have been found</string>
|
||||
<string name="slideshow">Слайдшоу</string>
|
||||
<string name="interval">Интервал (секунды):</string>
|
||||
<string name="include_photos">Включать изображения</string>
|
||||
<string name="include_videos">Включать видео</string>
|
||||
<string name="include_gifs">Включать GIF</string>
|
||||
<string name="random_order">Случайный порядок</string>
|
||||
<string name="use_fade">Эффект затухания</string>
|
||||
<string name="move_backwards">В обратном направлении</string>
|
||||
<string name="loop_slideshow">Закольцевать слайдшоу</string>
|
||||
<string name="slideshow_ended">Слайдшоу завершилось</string>
|
||||
<string name="no_media_for_slideshow">Никаких медиафайлов для слайдшоу не было найдено.</string>
|
||||
|
||||
<!-- View types -->
|
||||
<string name="change_view_type">Режим отображения</string>
|
||||
<string name="grid">Сетка</string>
|
||||
<string name="list">Список</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="show_hidden_media">Показать скрытые папки</string>
|
||||
<string name="show_hidden_media">Показывать скрытые папки</string>
|
||||
<string name="autoplay_videos">Воспроизводить видео автоматически</string>
|
||||
<string name="toggle_filename">Переключить отображение имени файла</string>
|
||||
<string name="show_media">Отображать</string>
|
||||
<string name="images">Только изображения</string>
|
||||
<string name="videos">Только видео</string>
|
||||
<string name="gifs">GIFs only</string>
|
||||
<string name="images_videos_gifs">Images, videos, GIFs</string>
|
||||
<string name="images_and_videos">Изображения и видео</string>
|
||||
<string name="loop_videos">Повторять видео</string>
|
||||
<string name="animate_gifs">Анимировать эскизы GIF-файлов</string>
|
||||
<string name="animate_gifs">Анимировать эскизы GIF</string>
|
||||
<string name="max_brightness">Максимальная яркость при просмотре файлов</string>
|
||||
<string name="crop_thumbnails">Нарезать миниатюры в квадраты</string>
|
||||
<string name="screen_rotation_by">Полноэкранный поворот</string>
|
||||
<string name="screen_rotation_system_setting">Системные настройки</string>
|
||||
<string name="screen_rotation_device_rotation">Поворот устройства</string>
|
||||
<string name="screen_rotation_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="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
<string name="dark_background_at_fullscreen">Тёмный фон в полноэкранном режиме</string>
|
||||
<string name="scroll_thumbnails_horizontally">Прокрутка эскизов по горизонтали</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Автоматически скрывать системный интерфейс в полноэкранном режиме</string>
|
||||
<string name="delete_empty_folders">Удалять пустые папки после удаления их содержимого</string>
|
||||
<string name="allow_video_gestures">Управлять громкостью и яркостью видео с помощью вертикальных жестов</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 -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Nastaviť ako</string>
|
||||
<string name="volume">Hlasitosť</string>
|
||||
<string name="brightness">Jas</string>
|
||||
<string name="do_not_ask_again">Nepýtať sa už v tomto spustení</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Filter médií</string>
|
||||
<string name="images">Obrázky</string>
|
||||
<string name="videos">Videá</string>
|
||||
<string name="gifs">GIFká</string>
|
||||
<string name="no_media_with_filters">So zvolenými filtrami sa nenašli žiadne média súbory.</string>
|
||||
<string name="change_filters_underlined"><u>Zmeniť filtre</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">Táto funkcia skryje priečinok pridaním súboru \'.nomedia\', skryté budú aj podpriečinky. Môžete ich vidieť zvolením možnosti \'Zobraziť skryté priečinky\' v nastaveniach. Pokračovať?</string>
|
||||
|
@ -41,7 +50,7 @@
|
|||
<string name="include_folders">Pridané priečinky</string>
|
||||
<string name="manage_included_folders">Spravovať pridané priečinky</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 -->
|
||||
<string name="resize">Zmeniť veľkosť</string>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Prezentácia</string>
|
||||
<string name="interval">Interval (sekundy):</string>
|
||||
<string name="include_photos">Zahrnúť fotky a GIF súbory</string>
|
||||
<string name="include_photos">Zahrnúť fotky</string>
|
||||
<string name="include_videos">Zahrnúť videá</string>
|
||||
<string name="include_gifs">Zahrnúť GIFy</string>
|
||||
<string name="random_order">Náhodné poradie</string>
|
||||
<string name="use_fade">Používať miznúce animácie</string>
|
||||
<string name="move_backwards">Ísť opačným smerom</string>
|
||||
<string name="loop_slideshow">Automaticky reštartovať prezentáciu</string>
|
||||
<string name="slideshow_ended">Prezentácia skončila</string>
|
||||
<string name="no_media_for_slideshow">Pre prezentáciu sa nenašli žiadne vhodné súbory</string>
|
||||
|
||||
<!-- View types -->
|
||||
<string name="change_view_type">Zmeniť typ zobrazenia</string>
|
||||
<string name="grid">Mriežka</string>
|
||||
<string name="list">Zoznam</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="show_hidden_media">Zobraziť skryté médiá</string>
|
||||
<string name="autoplay_videos">Spúšťať videá automaticky</string>
|
||||
<string name="toggle_filename">Prepnúť viditeľnosť názvov súborov</string>
|
||||
<string name="show_media">Zobraziť médiá</string>
|
||||
<string name="images">Iba obrázky</string>
|
||||
<string name="videos">Iba videá</string>
|
||||
<string name="gifs">Iba GIFká</string>
|
||||
<string name="images_videos_gifs">Obrázky, videá, GIFká</string>
|
||||
<string name="images_and_videos">Obrázky aj videá</string>
|
||||
<string name="loop_videos">Automaticky reštartovať videá</string>
|
||||
<string name="animate_gifs">Animovať GIF súbory pri náhľade</string>
|
||||
<string name="max_brightness">Maximálny jas pri prezeraní médií</string>
|
||||
|
@ -113,13 +123,17 @@
|
|||
<string name="dark_background_at_fullscreen">Tmavé pozadie pri médiách na celú obrazovku</string>
|
||||
<string name="scroll_thumbnails_horizontally">Prehliadať miniatúry vodorovne</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="allow_video_gestures">Povoliť ovládanie hlasitosti a jasu videí vertikálnymi ťahmi</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 -->
|
||||
<!-- 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_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.
|
||||
|
||||
|
|
|
@ -23,8 +23,17 @@
|
|||
<string name="select_photo">Välj foto</string>
|
||||
<string name="use_default">Använd standard</string>
|
||||
<string name="set_as">Ange som</string>
|
||||
<string name="volume">Volume</string>
|
||||
<string name="brightness">Brightness</string>
|
||||
<string name="volume">Volym</string>
|
||||
<string name="brightness">Ljusstyrka</string>
|
||||
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">Filtrera media</string>
|
||||
<string name="images">Bilder</string>
|
||||
<string name="videos">Videor</string>
|
||||
<string name="gifs">GIF-bilder</string>
|
||||
<string name="no_media_with_filters">Inga mediefiler hittades med valda filter.</string>
|
||||
<string name="change_filters_underlined"><u>Ändra filter</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">Denna funktion döljer mappen och alla dess undermappar genom att lägga till en \'.nomedia\'-fil i den. Du kan se dem genom att växla \'Visa dolda mappar\'-alternativet i Inställningar. Vill du fortsätta?</string>
|
||||
|
@ -41,7 +50,7 @@
|
|||
<string name="include_folders">Inkluderade mappar</string>
|
||||
<string name="manage_included_folders">Hantera inkluderade mappar</string>
|
||||
<string name="add_folder">Lägg till mapp</string>
|
||||
<string name="included_activity_placeholder">Om du har vissa mappar som innehåller media men som inte känns igen av appen kan du lägga till dem manuellt här.</string>
|
||||
<string name="included_activity_placeholder">Om du har vissa mappar som innehåller media men som inte känns igen av appen, kan du lägga till dem manuellt här.</string>
|
||||
|
||||
<!-- Resizing -->
|
||||
<string name="resize">Ändra storlek</string>
|
||||
|
@ -82,26 +91,27 @@
|
|||
<string name="landscape_aspect_ratio">Liggande bildförhållande</string>
|
||||
|
||||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</string>
|
||||
<string name="include_videos">Include videos</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="slideshow_ended">The slideshow ended</string>
|
||||
<string name="no_media_for_slideshow">No media for the slideshow have been found</string>
|
||||
<string name="slideshow">Bildspel</string>
|
||||
<string name="interval">Intervall (sekunder):</string>
|
||||
<string name="include_photos">Inkludera foton</string>
|
||||
<string name="include_videos">Inkludera videor</string>
|
||||
<string name="include_gifs">Inkludera GIF-bilder</string>
|
||||
<string name="random_order">Spela upp i slumpmässig ordning</string>
|
||||
<string name="use_fade">Använd toningsanimationer</string>
|
||||
<string name="move_backwards">Spela upp i omvänd ordning</string>
|
||||
<string name="loop_slideshow">Spela upp i en slinga</string>
|
||||
<string name="slideshow_ended">Bildspelet har avslutats</string>
|
||||
<string name="no_media_for_slideshow">Ingen media hittades för bildspelet</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">Visa dolda mappar</string>
|
||||
<string name="autoplay_videos">Spela upp videos automatiskt</string>
|
||||
<string name="toggle_filename">Visa/dölj filnamnen</string>
|
||||
<string name="show_media">Visa media</string>
|
||||
<string name="images">Endast bilder</string>
|
||||
<string name="videos">Endast videos</string>
|
||||
<string name="gifs">Bara GIF-bilder</string>
|
||||
<string name="images_videos_gifs">Bilder, videor, GIF-bilder</string>
|
||||
<string name="images_and_videos">Bilder och videos</string>
|
||||
<string name="loop_videos">Återspela videos</string>
|
||||
<string name="animate_gifs">Animera GIF-bilders miniatyrer</string>
|
||||
<string name="max_brightness">Maximal ljusstyrka när media visas</string>
|
||||
|
@ -113,15 +123,19 @@
|
|||
<string name="dark_background_at_fullscreen">Mörk bakgrund när media visas i helskärmsläge</string>
|
||||
<string name="scroll_thumbnails_horizontally">Rulla horisontellt genom miniatyrer</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="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</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="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 -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Ett Galleri för att visa bilder och videos utan en massa reklam.</string>
|
||||
<string name="app_long_description">
|
||||
Ett enkelt verktyg för att visa bilder och vdeos. Objekten kan sorteras efter datum, storlek, namn både stigande och fallande, bilder kan zoomas in. Mediafiler visas i flera kolumner beroende av skärmens storlek, du kan ändra antalet kolumner genom en nyp-rörelse. De går att döpa om, dela, ta bort, kopiera, flytta. Bilder kan också beskäras, roteras och anges som bakgrundsbild direkt från appen.
|
||||
Ett enkelt verktyg för att visa bilder och videos. Objekten kan sorteras efter datum, storlek, namn både stigande och fallande, bilder kan zoomas in. Mediafiler visas i flera kolumner beroende av skärmens storlek, du kan ändra antalet kolumner genom en nyp-rörelse. De går att döpa om, dela, ta bort, kopiera, flytta. Bilder kan också beskäras, roteras och anges som bakgrundsbild direkt från appen.
|
||||
|
||||
Galleriet kan också användas av tredjeparts för förhandsgranskning av bilder / videos, bifoga bilagor i e-postklienter etc. Den är perfekt för det dagliga användandet.
|
||||
Galleriet kan också användas av tredjepartsappar för förhandsgranskning av bilder / videos, bifoga bilagor i e-postklienter etc. Den är perfekt för det dagliga användandet.
|
||||
|
||||
Innehåller ingen reklam eller onödiga behörigheter. Det är helt och hållet opensource, innehåller anpassningsbara färger.
|
||||
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Set as</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>
|
||||
|
||||
<!-- 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">Bu işlev, klasöre\'.medya yok\'dosyası ekleyerek gizler; tüm alt klasörleri de gizler. Bunları Ayarlar\'da\'Gizli klasörleri göster\'seçeneğine basarak görebilirsiniz. Devam et?</string>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</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">Gizli klasörleri göster</string>
|
||||
<string name="autoplay_videos">Videoları otomatik olarak oynat</string>
|
||||
<string name="toggle_filename">Dosya adı görünürlüğünü değiştir</string>
|
||||
<string name="show_media">Medyayı göster</string>
|
||||
<string name="images">Yalnızca resimler</string>
|
||||
<string name="videos">Yalnızca videolar</string>
|
||||
<string name="gifs">GIFs only</string>
|
||||
<string name="images_videos_gifs">Images, videos, GIFs</string>
|
||||
<string name="images_and_videos">Resimler ve videolar</string>
|
||||
<string name="loop_videos">Videolar döngüsü</string>
|
||||
<string name="animate_gifs">Küçük resimlerde GIF\'leri canlandırın</string>
|
||||
<string name="max_brightness">Ortam görüntülerken azami parlaklık</string>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<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="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 -->
|
||||
|
|
|
@ -1,135 +1,341 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Simple Gallery</string>
|
||||
<string name="app_launcher_name">简约图库</string>
|
||||
<string name="edit">编辑</string>
|
||||
<string name="open_camera">打开相机</string>
|
||||
<string name="open_with">打开方式</string>
|
||||
<string name="no_app_found">未找到可用应用</string>
|
||||
<string name="hidden">(隐藏)</string>
|
||||
<string name="pin_folder">锁定目录</string>
|
||||
<string name="unpin_folder">解除锁定目录</string>
|
||||
<string name="show_all">文件视图</string>
|
||||
<string name="abc_action_bar_home_description">转到主屏幕</string>
|
||||
<string name="abc_action_bar_home_description_format">%1$s:%2$s</string>
|
||||
<string name="abc_action_bar_home_subtitle_description_format">%1$s - %2$s:%3$s</string>
|
||||
<string name="abc_action_bar_up_description">转到上一层级</string>
|
||||
<string name="abc_action_menu_overflow_description">更多选项</string>
|
||||
<string name="abc_action_mode_done">完成</string>
|
||||
<string name="abc_activity_chooser_view_see_all">查看全部</string>
|
||||
<string name="abc_activitychooserview_choose_application">选择应用</string>
|
||||
<string name="abc_capital_off">关闭</string>
|
||||
<string name="abc_capital_on">开启</string>
|
||||
<string name="abc_search_hint">搜索…</string>
|
||||
<string name="abc_searchview_description_clear">清除查询</string>
|
||||
<string name="abc_searchview_description_query">搜索查询</string>
|
||||
<string name="abc_searchview_description_search">搜索</string>
|
||||
<string name="abc_searchview_description_submit">提交查询</string>
|
||||
<string name="abc_searchview_description_voice">语音搜索</string>
|
||||
<string name="abc_shareactionprovider_share_with">分享方式</string>
|
||||
<string name="abc_shareactionprovider_share_with_application">通过%s分享</string>
|
||||
<string name="abc_toolbar_collapse_description">收起</string>
|
||||
<string name="fingerprint_acquired_imager_dirty">指纹传感器有脏污。请擦拭干净,然后重试。</string>
|
||||
<string name="fingerprint_acquired_insufficient">无法处理指纹,请重试。</string>
|
||||
<string name="fingerprint_acquired_partial">仅检测到部分指纹,请重试。</string>
|
||||
<string name="fingerprint_acquired_too_fast">手指移动太快,请重试。</string>
|
||||
<string name="fingerprint_acquired_too_slow">手指移动太慢,请重试。</string>
|
||||
<string name="fingerprint_error_canceled">指纹操作已取消。</string>
|
||||
<string name="fingerprint_error_hw_not_available">指纹硬件无法使用。</string>
|
||||
<string name="fingerprint_error_lockout">尝试次数过多,请稍后重试。</string>
|
||||
<string name="fingerprint_error_no_space">无法存储指纹。请移除一个现有的指纹。</string>
|
||||
<string name="fingerprint_error_timeout">指纹录入操作超时,请重试。</string>
|
||||
<string name="fingerprint_error_unable_to_process">请重试。</string>
|
||||
<string name="fingerprint_not_recognized">无法识别</string>
|
||||
<string name="fingerprints">指纹:</string>
|
||||
<string name="search_menu_title">搜索</string>
|
||||
<string name="status_bar_notification_info_overflow">999+</string>
|
||||
<string name="about">关于</string>
|
||||
<string name="add_fingerprint">添加指纹</string>
|
||||
<string name="add_folder">添加目录</string>
|
||||
<string name="additional_info">额外信息</string>
|
||||
<string name="album">专辑</string>
|
||||
<string name="all_folders">所有目录</string>
|
||||
<string name="folder_view">目录视图</string>
|
||||
<string name="other_folder">其他目录</string>
|
||||
<string name="show_on_map">在地图中显示</string>
|
||||
<string name="unknown_location">未知位置</string>
|
||||
<string name="no_map_application">未找到地图应用</string>
|
||||
<string name="no_camera_app_found">未找到相机应用</string>
|
||||
<string name="increase_column_count">增加一栏</string>
|
||||
<string name="reduce_column_count">减少一栏</string>
|
||||
<string name="change_cover_image">更改封面图片</string>
|
||||
<string name="select_photo">选择图片</string>
|
||||
<string name="use_default">使用默认</string>
|
||||
<string name="set_as">设置为</string>
|
||||
<string name="volume">音量</string>
|
||||
<string name="allow_video_gestures">使用纵向滑动手势控制视频音量和亮度</string>
|
||||
<string name="an_error_occurred">啊哦,出错啦: %s</string>
|
||||
<string name="animate_gifs">GIF 缩略图</string>
|
||||
<string name="app_launcher_name">简约图库</string>
|
||||
<string name="app_long_description">一个观看照片和视频的简单实用工具。项目可以根据日期、大小、名称来递增或递减排序,照片可以缩放。媒体文件根据屏幕的大小排列在多个方格中,您可以使用缩放手势来调整每一列的方格数量。媒体文件可以被重命名、分享、删除、复制以及移动。照片亦可被剪切、旋转或是直接在应用中设为壁纸。 相册亦提供能让第三方应用预览图片/视频、向电子邮件客户端添加附件等的功能。非常适合日常使用。 应用不包含广告与不必要的权限。它是完全开放源代码的,并内置自定义颜色主题。 这个应用只是一系列应用中的一小部份。您可以在 http://www.simplemobiletools.com 找到其余的应用。</string>
|
||||
<string name="app_name">简约图库</string>
|
||||
<string name="app_short_description">一个没有广告,用来观看照片及视频的相册。</string>
|
||||
<string name="app_version">应用版本:%1$s</string>
|
||||
<string name="append">"应用到 '_1'"</string>
|
||||
<string name="apply_to_all">应用到全部冲突项</string>
|
||||
<string name="artist">艺术家</string>
|
||||
<string name="ascending">递增</string>
|
||||
<string name="authentication_blocked">验证已被阻止,请稍后再试</string>
|
||||
<string name="authentication_failed">验证失败</string>
|
||||
<string name="autoplay_videos">自动播放</string>
|
||||
<string name="background_color">背景色</string>
|
||||
<string name="brightness">亮度</string>
|
||||
<string name="camera">相机</string>
|
||||
<string name="cancel">取消</string>
|
||||
<string name="change_cover_image">更改封面图片</string>
|
||||
<string name="change_filters_underlined"><u>更改过滤器</u></string>
|
||||
<string name="change_view_type">更改视图类型</string>
|
||||
<string name="changing_color_description">更改颜色将切换到自定义主题</string>
|
||||
<string name="click_select_destination">点击此处以设置目标路径</string>
|
||||
<string name="confirm_selection">确认选择</string>
|
||||
<string name="confirm_storage_access_text">请选择 SD 卡根目录并授予写权限</string>
|
||||
<string name="confirm_storage_access_text_sd">如果您未找到 SD 卡目录,请尝试</string>
|
||||
<string name="confirm_storage_access_title">确认外部存储器访问权限</string>
|
||||
<string name="copy">复制</string>
|
||||
<string name="copy_failed">无法复制文件</string>
|
||||
<string name="copy_move">复制/移动</string>
|
||||
<string name="copy_move_failed">操作失败</string>
|
||||
<string name="copy_to">复制到</string>
|
||||
<string name="copying">正在复制…</string>
|
||||
<string name="copying_success">复制成功</string>
|
||||
<string name="copying_success_partial">无法复制相同文件</string>
|
||||
<string name="copyright">v %1$s Copyright © Simple Mobile Tools %2$d</string>
|
||||
<string name="could_not_create_file">创建文件 %s 失败</string>
|
||||
<string name="could_not_create_folder">创建文件夹 %s 失败</string>
|
||||
<string name="create_new">新建</string>
|
||||
<string name="create_new_folder">新建文件夹</string>
|
||||
<string name="crop_thumbnails">裁剪缩略图</string>
|
||||
<string name="cropper_title">Android Image Cropper(图像裁剪和旋转)</string>
|
||||
<string name="custom">自定义</string>
|
||||
<string name="customize_colors">自定义颜色</string>
|
||||
<string name="dark_background_at_fullscreen">全屏时黑色背景</string>
|
||||
<string name="dark_theme">深色主题</string>
|
||||
<string name="date_taken">拍摄日期</string>
|
||||
<string name="delete">删除</string>
|
||||
<string name="delete_empty_folders">删除没有内容的空文件夹</string>
|
||||
<string name="descending">递减</string>
|
||||
<string name="destination">目标路径</string>
|
||||
<string name="device_os">设备系统:%1$s</string>
|
||||
<string name="direct_children_count">子目录数</string>
|
||||
<string name="discard">丢弃</string>
|
||||
<string name="do_not_ask_again">不再询问</string>
|
||||
<string name="donate">捐赠</string>
|
||||
<string name="donate_please">"您已使用此应用一段时间了。
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">通过添加文件 \'.nomedia\' 到目录,可以防止目录及其子目录下的所有媒体被扫描。您可以通过设置中的 \'显示隐藏目录\' 选项改变设置,是否继续?</string>
|
||||
可您知道么,我并不就职于一个大公司。开发应用耗时耗力,且我想依旧保持免费,您的捐赠会给我更多动力。
|
||||
|
||||
您可以通过购买付费应用 Simple Thank You 或捐赠比特币来支持我。
|
||||
|
||||
更多信息请查阅 http://simplemobiletools.com/donate.
|
||||
|
||||
非常感谢!"</string>
|
||||
<string name="donate_underlined"><u>捐赠</u></string>
|
||||
<string name="duration">时长</string>
|
||||
<string name="edit">编辑</string>
|
||||
<string name="edit_image_with">编辑方式:</string>
|
||||
<string name="edit_with">编辑方式</string>
|
||||
<string name="editor">编辑器</string>
|
||||
<string name="email_label">发送反馈</string>
|
||||
<string name="empty_name">请输入名称</string>
|
||||
<string name="enter_pin">输入密码</string>
|
||||
<string name="error_saving_file">不能覆盖源文件</string>
|
||||
<string name="exclude">排除</string>
|
||||
<string name="excluded_folders">排除目录</string>
|
||||
<string name="manage_excluded_folders">管理排除目录</string>
|
||||
<string name="exclude_folder_description">目录及其子目录中的媒体将不会在 Simple Gallery 中显示,您可以在设置更改。</string>
|
||||
<string name="exclude_folder_parent">是否排除父目录?</string>
|
||||
<string name="excluded_activity_placeholder">此目录及其子目录中的媒体将不会在 Simple Gallery 中显示,但是其它应用可以访问。如果您想对其它应用隐藏,请使用隐藏功能。</string>
|
||||
<string name="remove_all">移除全部</string>
|
||||
<string name="remove_all_description">是否移除列表中的全部目录?目录不会被物理删除。</string>
|
||||
|
||||
<!-- Include folders -->
|
||||
<string name="include_folders">包含目录</string>
|
||||
<string name="manage_included_folders">管理包含目录</string>
|
||||
<string name="add_folder">添加目录</string>
|
||||
<string name="included_activity_placeholder">如果您还有应用未扫描到的媒体文件,请添加所在目录路径。</string>
|
||||
|
||||
<!-- Resizing -->
|
||||
<string name="resize">缩放</string>
|
||||
<string name="resize_and_save">缩放选定区域并保存</string>
|
||||
<string name="width">宽度</string>
|
||||
<string name="height">高度</string>
|
||||
<string name="keep_aspect_ratio">保持纵横比</string>
|
||||
<string name="invalid_values">请输入有效分辨率</string>
|
||||
|
||||
<!-- Editor -->
|
||||
<string name="editor">编辑器</string>
|
||||
<string name="save">保存</string>
|
||||
<string name="rotate">旋转</string>
|
||||
<string name="path">路径</string>
|
||||
<string name="invalid_image_path">无效图片路径</string>
|
||||
<string name="image_editing_failed">图片编辑失败</string>
|
||||
<string name="edit_image_with">编辑方式:</string>
|
||||
<string name="no_editor_found">未找到可用图片编辑器</string>
|
||||
<string name="unknown_file_location">未知的文件路径</string>
|
||||
<string name="error_saving_file">不能覆盖源文件</string>
|
||||
<string name="rotate_left">向左旋转</string>
|
||||
<string name="rotate_right">向右旋转</string>
|
||||
<string name="rotate_one_eighty">旋转 180º</string>
|
||||
<string name="excluded_folders">排除目录</string>
|
||||
<string name="exif">EXIF</string>
|
||||
<string name="exposure_time">曝光时间</string>
|
||||
<string name="extension">扩展名</string>
|
||||
<string name="extension_cannot_be_empty">扩展名不能为空</string>
|
||||
<string name="extra_large">超大</string>
|
||||
<string name="f_number">光圈</string>
|
||||
<string name="file">文件</string>
|
||||
<string name="file_already_exists">文件 %1$s 已存在</string>
|
||||
<string name="file_already_exists_overwrite">文件 %1$s 已存在。是否覆盖?</string>
|
||||
<string name="file_saved">文件保存成功</string>
|
||||
<string name="filename">文件名</string>
|
||||
<string name="filename_cannot_be_empty">文件名不能为空</string>
|
||||
<string name="filename_invalid_characters">文件名包含非法字符</string>
|
||||
<string name="files_count">总文件数</string>
|
||||
<string name="filter_media">要显示的媒体文件</string>
|
||||
<string name="fingerprint">指纹</string>
|
||||
<string name="fingerprint_setup_successfully">保护设置成功。请重新安装本应用,以防复位时出现问题。</string>
|
||||
<string name="flip">翻转</string>
|
||||
<string name="flip_horizontally">水平翻转</string>
|
||||
<string name="flip_vertically">垂直翻转</string>
|
||||
<string name="edit_with">编辑方式</string>
|
||||
|
||||
<!-- Set wallpaper -->
|
||||
<string name="simple_wallpaper">Simple Wallpaper</string>
|
||||
<string name="focal_length">焦距</string>
|
||||
<string name="folder">文件夹</string>
|
||||
<string name="folder_view">目录视图</string>
|
||||
<string name="follow_us">关注我们:</string>
|
||||
<string name="font_size">字体大小</string>
|
||||
<string name="gifs">GIFs</string>
|
||||
<string name="glide_title">滑动(图像加载和缓存)</string>
|
||||
<string name="go_to_settings">去设置</string>
|
||||
<string name="grid">格</string>
|
||||
<string name="gruveo">你在寻找一个简单而匿名的视频通话应用吗?请尝试我的另一个项目</string>
|
||||
<string name="height">高度</string>
|
||||
<string name="hidden">(隐藏)</string>
|
||||
<string name="hide">隐藏</string>
|
||||
<string name="hide_folder">隐藏文件夹</string>
|
||||
<string name="hide_folder_description">"通过添加文件 '.nomedia' 到目录,可以防止目录及其子目录下的所有媒体被扫描。您可以通过设置中的 '显示隐藏目录' 选项改变设置,是否继续?"</string>
|
||||
<string name="hide_system_ui_at_fullscreen">全屏时自动隐藏状态栏</string>
|
||||
<string name="image_editing_failed">图片编辑失败</string>
|
||||
<string name="images">图片</string>
|
||||
<string name="include_folders">包含目录</string>
|
||||
<string name="include_gifs">包含 GIFs</string>
|
||||
<string name="include_photos">包含照片</string>
|
||||
<string name="include_videos">包含视频</string>
|
||||
<string name="included_activity_placeholder">如果您还有应用未扫描到的媒体文件,请添加所在目录路径。</string>
|
||||
<string name="increase_column_count">增加一栏</string>
|
||||
<string name="insert_pattern">绘制图案</string>
|
||||
<string name="internal">内部存储器</string>
|
||||
<string name="interval">间隔(秒):</string>
|
||||
<string name="invalid_destination">无法写入到选中目标路径</string>
|
||||
<string name="invalid_file_format">无效文件格式</string>
|
||||
<string name="invalid_image_path">无效图片路径</string>
|
||||
<string name="invalid_name">名称包含非法字符</string>
|
||||
<string name="invalid_values">请输入有效分辨率</string>
|
||||
<string name="invite_friends_underlined"><u>分享给好友</u></string>
|
||||
<string name="invite_via">分享到</string>
|
||||
<string name="iso_speed">ISO 速度</string>
|
||||
<string name="items_selected">已选择项目</string>
|
||||
<string name="joda_title">Joda-Time(Java日期替换)</string>
|
||||
<string name="keep_aspect_ratio">保持纵横比</string>
|
||||
<string name="kotlin_title">Kotlin(编程语言)</string>
|
||||
<string name="landscape_aspect_ratio">横向长宽比</string>
|
||||
<string name="large">大</string>
|
||||
<string name="last_modified">修改日期</string>
|
||||
<string name="light_theme">浅色主题</string>
|
||||
<string name="list">列表</string>
|
||||
<string name="loop_slideshow">循环幻灯片</string>
|
||||
<string name="loop_videos">循环播放视频</string>
|
||||
<string name="manage_excluded_folders">管理排除目录</string>
|
||||
<string name="manage_extended_details">要显示的详细信息项目</string>
|
||||
<string name="manage_included_folders">管理包含目录</string>
|
||||
<string name="max_brightness">浏览时最大亮度</string>
|
||||
<string name="medium">中</string>
|
||||
<string name="more_apps_underlined"><u>更多应用</u></string>
|
||||
<string name="move">移动</string>
|
||||
<string name="move_backwards">倒播</string>
|
||||
<string name="move_to">移动到</string>
|
||||
<string name="moving">正在移动…</string>
|
||||
<string name="moving_success">文件移动成功</string>
|
||||
<string name="moving_success_partial">无法移动相同文件</string>
|
||||
<string name="multiselect_title">RecyclerView MultiSelect(选择多个列表项)</string>
|
||||
<string name="name">名称</string>
|
||||
<string name="name_taken">同名文件夹或文件已存在</string>
|
||||
<string name="no">否</string>
|
||||
<string name="no_app_found">未找到可用应用</string>
|
||||
<string name="no_camera_app_found">未找到相机应用</string>
|
||||
<string name="no_capable_app_found">未找到可用应用</string>
|
||||
<string name="no_editor_found">未找到可用图片编辑器</string>
|
||||
<string name="no_files_selected">未选择文件</string>
|
||||
<string name="no_fingerprints_registered">您还没有注册指纹,请先给你的设备添加一些指纹</string>
|
||||
<string name="no_map_application">未找到地图应用</string>
|
||||
<string name="no_media_for_slideshow">未发现可用媒体</string>
|
||||
<string name="no_media_with_filters">所选的过滤器没有找到的媒体文件。</string>
|
||||
<string name="no_storage_permissions">请授予权限以访问您的存储器</string>
|
||||
<string name="notice">此应用使用了以下三方库。谢谢。</string>
|
||||
<string name="ok">确认</string>
|
||||
<string name="open_camera">打开相机</string>
|
||||
<string name="open_with">打开方式</string>
|
||||
<string name="other_folder">其他目录</string>
|
||||
<string name="otto_title">Otto (event bus)</string>
|
||||
<string name="out_of_memory_error">内存不足</string>
|
||||
<string name="overwrite">覆盖</string>
|
||||
<string name="password_protect_hidden_items">使用密码保护隐藏项</string>
|
||||
<string name="path">路径</string>
|
||||
<string name="pattern">图案</string>
|
||||
<string name="pattern_title">PatternLockView(图案保护)</string>
|
||||
<string name="photoview_title">PhotoView(可缩放 gifs)</string>
|
||||
<string name="picasso_title">Picasso(图像加载和缓存)</string>
|
||||
<string name="pin">密码</string>
|
||||
<string name="pin_folder">锁定目录</string>
|
||||
<string name="place_finger">请将手指放在指纹传感器上</string>
|
||||
<string name="please_enter_pin">请输入密码</string>
|
||||
<string name="please_select_destination">请选择目标路径</string>
|
||||
<string name="portrait_aspect_ratio">纵向长宽比</string>
|
||||
<string name="primary_color">主体色</string>
|
||||
<string name="proceed_with_deletion">是否执行此删除操作?</string>
|
||||
<string name="properties">属性</string>
|
||||
<string name="protection_setup_successfully">密码设置成功。为防止遗忘,请重新安装本应用。</string>
|
||||
<string name="random_order">随机顺序</string>
|
||||
<string name="rate_us_underlined"><u>为我们打分</u></string>
|
||||
<string name="reduce_column_count">减少一栏</string>
|
||||
<string name="remove_all">移除全部</string>
|
||||
<string name="remove_all_description">是否移除列表中的全部目录?目录不会被物理删除。</string>
|
||||
<string name="rename">重命名</string>
|
||||
<string name="rename_file">重命名文件</string>
|
||||
<string name="rename_file_error">无法重命名文件</string>
|
||||
<string name="rename_folder">重命名文件夹</string>
|
||||
<string name="rename_folder_empty">文件夹名不能为空</string>
|
||||
<string name="rename_folder_error">无法重命名文件夹</string>
|
||||
<string name="rename_folder_exists">文件夹名已存在</string>
|
||||
<string name="rename_folder_ok">文件夹重命名成功</string>
|
||||
<string name="rename_folder_root">无法重命名存储器的根目录</string>
|
||||
<string name="renaming_folder">重命名中...</string>
|
||||
<string name="repeat_pattern">重复图案</string>
|
||||
<string name="repeat_pin">重复密码</string>
|
||||
<string name="replace_share_with_rotate">替换全屏时菜单栏的“分享”为“旋转”</string>
|
||||
<string name="resize">缩放</string>
|
||||
<string name="resize_and_save">缩放选定区域并保存</string>
|
||||
<string name="resolution">分辨率</string>
|
||||
<string name="restore_defaults">恢复默认</string>
|
||||
<string name="root">根目录</string>
|
||||
<string name="rotate">旋转</string>
|
||||
<string name="rotate_left">向左旋转</string>
|
||||
<string name="rotate_one_eighty">旋转 180º</string>
|
||||
<string name="rotate_right">向右旋转</string>
|
||||
<string name="rtl_viewpager_title">RtlViewPager(从右到左滑动)</string>
|
||||
<string name="save">保存</string>
|
||||
<string name="save_as">保存</string>
|
||||
<string name="save_before_closing">您尚未保存更改,是否保存?</string>
|
||||
<string name="saving">正在保存…</string>
|
||||
<string name="screen_rotation_aspect_ratio">根据长宽比</string>
|
||||
<string name="screen_rotation_by">全屏方向</string>
|
||||
<string name="screen_rotation_device_rotation">设备方向</string>
|
||||
<string name="screen_rotation_system_setting">系统设置</string>
|
||||
<string name="scroll_thumbnails_horizontally">水平滚动缩略图</string>
|
||||
<string name="sd_card">SD 卡</string>
|
||||
<string name="search">搜索</string>
|
||||
<string name="select_all">全选</string>
|
||||
<string name="select_an_action">选择操作</string>
|
||||
<string name="select_destination">选择目标路径</string>
|
||||
<string name="select_file">选择文件</string>
|
||||
<string name="select_folder">选择文件夹</string>
|
||||
<string name="select_photo">选择图片</string>
|
||||
<string name="select_storage">选择存储器</string>
|
||||
<string name="set_as">设置为</string>
|
||||
<string name="set_as_wallpaper">设为壁纸</string>
|
||||
<string name="set_as_wallpaper_failed">壁纸设置失败</string>
|
||||
<string name="set_as_wallpaper_with">设为壁纸...</string>
|
||||
<string name="no_capable_app_found">未找到可用应用</string>
|
||||
<string name="setting_wallpaper">正在设置壁纸…</string>
|
||||
<string name="wallpaper_set_successfully">壁纸设置成功</string>
|
||||
<string name="portrait_aspect_ratio">纵向长宽比</string>
|
||||
<string name="landscape_aspect_ratio">横向长宽比</string>
|
||||
|
||||
<!-- Slideshow -->
|
||||
<string name="slideshow">幻灯片</string>
|
||||
<string name="interval">间隔(秒):</string>
|
||||
<string name="include_photos">包含照片和动态图</string>
|
||||
<string name="include_videos">包含视频</string>
|
||||
<string name="random_order">随机顺序</string>
|
||||
<string name="use_fade">使用渐变动画</string>
|
||||
<string name="move_backwards">倒播</string>
|
||||
<string name="slideshow_ended">幻灯片结束</string>
|
||||
<string name="no_media_for_slideshow">未发现可用媒体</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="setting_wallpaper">正在设置壁纸…</string>
|
||||
<string name="settings">设置</string>
|
||||
<string name="share">分享</string>
|
||||
<string name="share_text">请前往 %2$s 看看我们的 %1$s 吧!</string>
|
||||
<string name="share_via">分享到</string>
|
||||
<string name="show_all">文件视图</string>
|
||||
<string name="show_extended_details">全屏浏览媒体时显示详细信息</string>
|
||||
<string name="show_hidden">显示隐藏文件和文件夹</string>
|
||||
<string name="show_hidden_media">显示所有</string>
|
||||
<string name="autoplay_videos">自动播放</string>
|
||||
<string name="show_on_map">在地图中显示</string>
|
||||
<string name="simple_wallpaper">简约壁纸</string>
|
||||
<string name="size">大小</string>
|
||||
<string name="skip">跳过</string>
|
||||
<string name="slideshow">幻灯片</string>
|
||||
<string name="slideshow_ended">幻灯片结束</string>
|
||||
<string name="small">小</string>
|
||||
<string name="sort_by">排序方式</string>
|
||||
<string name="source">原始路径</string>
|
||||
<string name="source_and_destination_same">原始路径和目标路径不能相同</string>
|
||||
<string name="stetho_title">Stetho(调试数据库)</string>
|
||||
<string name="stop_showing_hidden">不显示隐藏的媒体文件</string>
|
||||
<string name="subsampling_title">Subsampling Scale Image View(可缩放图像浏览)</string>
|
||||
<string name="temporarily_show_hidden">显示/隐藏缓存内容</string>
|
||||
<string name="text_color">文本颜色</string>
|
||||
<string name="theme">主题</string>
|
||||
<string name="third_party_licences">开放源代码</string>
|
||||
<string name="third_party_licences_underlined"><u>开放源代码</u></string>
|
||||
<string name="title">标题</string>
|
||||
<string name="toggle_filename">显示文件名</string>
|
||||
<string name="show_media">显示多媒体文件</string>
|
||||
<string name="images">仅图片</string>
|
||||
<string name="videos">仅视频</string>
|
||||
<string name="gifs">仅 GIF </string>
|
||||
<string name="images_videos_gifs">图片,视频,GIF</string>
|
||||
<string name="images_and_videos">图片和视频</string>
|
||||
<string name="loop_videos">循环播放视频</string>
|
||||
<string name="animate_gifs">GIF 缩略图</string>
|
||||
<string name="max_brightness">浏览时最大亮度</string>
|
||||
<string name="crop_thumbnails">裁剪缩略图</string>
|
||||
<string name="screen_rotation_by">全屏时方向</string>
|
||||
<string name="screen_rotation_system_setting">系统设置</string>
|
||||
<string name="screen_rotation_device_rotation">设备方向</string>
|
||||
<string name="screen_rotation_aspect_ratio">根据长宽比</string>
|
||||
<string name="dark_background_at_fullscreen">全屏时黑色背景</string>
|
||||
<string name="scroll_thumbnails_horizontally">水平滚动缩略图</string>
|
||||
<string name="hide_system_ui_at_fullscreen">全屏时自动隐藏状态栏</string>
|
||||
<string name="replace_share_with_rotate">替换全屏时菜单栏的“分享”为“旋转”</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">一个没有广告,用来观看照片及视频的相册。</string>
|
||||
<string name="app_long_description">
|
||||
一个观看照片和视频的简单实用工具。项目可以根据日期、大小、名称来递增或递减排序,照片可以缩放。媒体文件根据屏幕的大小排列在多个方格中,您可以使用缩放手势来调整每一列的方格数量。媒体文件可以被重命名、分享、删除、复制以及移动。照片亦可被剪切、旋转或是直接在应用中设为壁纸。
|
||||
|
||||
相册亦提供能让第三方应用预览图片/视频、向电子邮件客户端添加附件等的功能。非常适合日常使用。
|
||||
|
||||
应用不包含广告与不必要的权限。它是完全开放源代码的,并内置自定义颜色主题。
|
||||
|
||||
这个应用只是一系列应用中的一小部份。您可以在 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
|
||||
-->
|
||||
<string name="undo_changes">撤销更改</string>
|
||||
<string name="undo_changes_confirmation">是否撤销您的更改?</string>
|
||||
<string name="unhide">取消隐藏</string>
|
||||
<string name="unhide_folder">取消隐藏文件夹</string>
|
||||
<string name="unknown_error_occurred">未知错误</string>
|
||||
<string name="unknown_file_location">未知的文件路径</string>
|
||||
<string name="unknown_location">未知位置</string>
|
||||
<string name="unpin_folder">解除锁定目录</string>
|
||||
<string name="use_default">使用默认</string>
|
||||
<string name="use_fade">使用渐变动画</string>
|
||||
<string name="use_for_this_folder">仅应用于此文件夹</string>
|
||||
<string name="videos">视频</string>
|
||||
<string name="volume">音量</string>
|
||||
<string name="wallpaper_set_successfully">壁纸设置成功</string>
|
||||
<string name="website_label">应用源码</string>
|
||||
<string name="whats_new">更新日志</string>
|
||||
<string name="whats_new_disclaimer">* 此处仅列举了重大更新,更多修正可在使用中体验</string>
|
||||
<string name="width">宽度</string>
|
||||
<string name="wrong_pattern">图案错误</string>
|
||||
<string name="wrong_pin">密码错误</string>
|
||||
<string name="wrong_root_selected">目录选择错误,请选择 SD 卡</string>
|
||||
<string name="yes">是</string>
|
||||
</resources>
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">設為</string>
|
||||
<string name="volume">音量</string>
|
||||
<string name="brightness">亮度</string>
|
||||
<string name="do_not_ask_again">Do not ask again in this session</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter_media">篩選媒體檔案</string>
|
||||
<string name="images">圖片</string>
|
||||
<string name="videos">影片</string>
|
||||
<string name="gifs">GIF</string>
|
||||
<string name="no_media_with_filters">選擇的篩選條件未發現媒體檔案。</string>
|
||||
<string name="change_filters_underlined"><u>更改篩選條件</u></string>
|
||||
|
||||
<!-- Hide / Exclude -->
|
||||
<string name="hide_folder_description">這功能藉由添加一個\'.nomedia\'檔案,來隱藏資料夾和所有子資料夾。您可以透過設定中的「顯示隱藏的資料夾」選項來查看。\n是否繼續?</string>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">投影片</string>
|
||||
<string name="interval">間隔 (秒):</string>
|
||||
<string name="include_photos">包含照片和GIF</string>
|
||||
<string name="include_photos">Include photos</string>
|
||||
<string name="include_videos">包含影片</string>
|
||||
<string name="include_gifs">Include GIFs</string>
|
||||
<string name="random_order">隨機順序</string>
|
||||
<string name="use_fade">使用淡入淡出動畫</string>
|
||||
<string name="move_backwards">反向播放</string>
|
||||
<string name="loop_slideshow">Loop slideshow</string>
|
||||
<string name="slideshow_ended">投影片結束</string>
|
||||
<string name="no_media_for_slideshow">找不到投影片的媒體檔案</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">顯示隱藏的媒體檔案</string>
|
||||
<string name="autoplay_videos">自動播放影片</string>
|
||||
<string name="toggle_filename">顯示檔案名稱</string>
|
||||
<string name="show_media">顯示媒體檔案</string>
|
||||
<string name="images">只有圖片</string>
|
||||
<string name="videos">只有影片</string>
|
||||
<string name="gifs">只有GIF</string>
|
||||
<string name="images_videos_gifs">圖片、影片、GIF</string>
|
||||
<string name="images_and_videos">圖片和影片</string>
|
||||
<string name="loop_videos">影片循環播放</string>
|
||||
<string name="animate_gifs">縮圖顯示GIF動畫</string>
|
||||
<string name="max_brightness">瀏覽時最大亮度</string>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<string name="dark_background_at_fullscreen">全螢幕時黑背景</string>
|
||||
<string name="scroll_thumbnails_horizontally">橫向滑動縮圖</string>
|
||||
<string name="hide_system_ui_at_fullscreen">全螢幕時自動隱藏系統介面</string>
|
||||
<string name="delete_empty_folders">刪除內容後刪除空白資料夾</string>
|
||||
<string name="allow_video_gestures">允許用上下手勢來控制影片的音量和亮度</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 -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
<dimen name="dir_tmb_size">150dp</dimen>
|
||||
<dimen name="medium_tmb_size">100dp</dimen>
|
||||
<dimen name="sd_card_icon_size">20dp</dimen>
|
||||
<dimen name="play_outline_icon_size">22dp</dimen>
|
||||
<dimen name="selection_check_size">26dp</dimen>
|
||||
<dimen name="play_outline_size_big">150dp</dimen>
|
||||
<dimen name="timer_padding">24dp</dimen>
|
||||
<dimen name="tmb_shadow_height">50dp</dimen>
|
||||
<dimen name="video_side_slider_width">150dp</dimen>
|
||||
<dimen name="list_view_folder_thumbnail_size">72dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -2,12 +2,22 @@
|
|||
<resources>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_136">Added an option to show customizable extended details over fullscreen media</string>
|
||||
<string name="release_133">
|
||||
Added fingerprint to hidden item protection\n
|
||||
Added a new List view type
|
||||
</string>
|
||||
<string name="release_127">
|
||||
Added a switch for disabling video gestures\n
|
||||
Added a switch for deleting empty folders after deleting content
|
||||
</string>
|
||||
<string name="release_125">Moved media type filter from Settings to the Action menu</string>
|
||||
<string name="release_123">Allow changing the screen brightness and volume at videos by vertically dragging the screen sides</string>
|
||||
<string name="release_122">Added slideshow at the fullscreen view</string>
|
||||
<string name="release_119">Added pattern/pin protection for showing hidden items</string>
|
||||
<string name="release_118">Added a toggle for replacing Share with Rotate at fullscreen media</string>
|
||||
<string name="release_115">
|
||||
Added an indicator of folders located on SD cards
|
||||
Added an indicator of folders located on SD cards\n
|
||||
Improved the way of rotating jpg images on the internal storage by modifying the exif tags + added autosave
|
||||
</string>
|
||||
<string name="release_114">Added an option for automatically hiding the system UI at entering fullscreen mode</string>
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
<string name="set_as">Set as</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>
|
||||
|
||||
<!-- 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>
|
||||
|
@ -41,7 +50,7 @@
|
|||
<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.</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>
|
||||
|
@ -84,24 +93,25 @@
|
|||
<!-- Slideshow -->
|
||||
<string name="slideshow">Slideshow</string>
|
||||
<string name="interval">Interval (seconds):</string>
|
||||
<string name="include_photos">Include photos and GIFs</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="show_media">Show media</string>
|
||||
<string name="images">Images only</string>
|
||||
<string name="videos">Videos only</string>
|
||||
<string name="gifs">GIFs only</string>
|
||||
<string name="images_videos_gifs">Images, videos, GIFs</string>
|
||||
<string name="images_and_videos">Images and videos</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>
|
||||
|
@ -113,7 +123,11 @@
|
|||
<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="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 -->
|
||||
|
|
|
@ -16,6 +16,7 @@ allprojects {
|
|||
repositories {
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url "https://maven.google.com" }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue