From 0e8d61b33e34a929bc5183135405f5bec136269a Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 14 Jun 2018 22:51:16 +0200 Subject: [PATCH 01/17] allow selecting multiple items by long pressing the first and last selection item --- build.gradle | 2 +- .../commons/adapters/MyRecyclerViewAdapter.kt | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 053fd5afa..da06ed804 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.1.11' + propVersionName = '4.1.14' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt index 08b55b808..aabe19991 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt @@ -35,6 +35,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc private val multiSelector = MultiSelector() private var actMode: ActionMode? = null private var actBarTextView: TextView? = null + private var lastLongPressedItem = -1 abstract fun getActionMenuId(): Int @@ -88,6 +89,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc notifyItemChanged(i + positionOffset) } updateTitle(cnt) + lastLongPressedItem = -1 } protected fun setupDragListener(enable: Boolean) { @@ -184,12 +186,19 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc private val adapterListener = object : MyAdapterListener { override fun toggleItemSelectionAdapter(select: Boolean, position: Int) { toggleItemSelection(select, position) + lastLongPressedItem = -1 } override fun getSelectedPositions() = selectedPositions override fun itemLongClicked(position: Int) { recyclerView.setDragSelectActive(position) + lastLongPressedItem = if (lastLongPressedItem == -1) { + position + } else { + selectItemRange(lastLongPressedItem, position, Math.min(lastLongPressedItem, position), Math.max(lastLongPressedItem, position)) + -1 + } } } @@ -228,6 +237,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc selectedPositions.clear() actBarTextView?.text = "" actMode = null + lastLongPressedItem = -1 } } From b6807363561fd7f1a78a96fd9e437930f27346af Mon Sep 17 00:00:00 2001 From: Guillaume Date: Fri, 15 Jun 2018 00:05:30 +0200 Subject: [PATCH 02/17] Dutch --- commons/src/main/res/values-nl/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-nl/strings.xml b/commons/src/main/res/values-nl/strings.xml index fe86ecb92..527afe2dd 100644 --- a/commons/src/main/res/values-nl/strings.xml +++ b/commons/src/main/res/values-nl/strings.xml @@ -212,8 +212,8 @@ Nee - WARNING: You are deleting a folder - WARNING: You are deleting %d folders + WAARSCHUWING: Hele map zal worden verwijderd + WAARSCHUWING: %d mappen zullen worden verwijderd From 9947864246b87b8c12e5f8ff47406f7555f0cd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Solatec=20Inform=C3=A0tica?= <35220662+Solatec@users.noreply.github.com> Date: Fri, 15 Jun 2018 12:26:18 +0200 Subject: [PATCH 03/17] Update strings.xml --- commons/src/main/res/values-ca/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-ca/strings.xml b/commons/src/main/res/values-ca/strings.xml index aabb0342a..8a6451252 100644 --- a/commons/src/main/res/values-ca/strings.xml +++ b/commons/src/main/res/values-ca/strings.xml @@ -211,8 +211,8 @@ No - WARNING: You are deleting a folder - WARNING: You are deleting %d folders + ADVERTIMENT: s\'eliminarà una carpeta + ADVERTIMENT: s\'eliminaran %d carpetes WARNING: You are deleting %d folders From 80d4730c58c17d71572d0ddc73a88abf637a2781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Solatec=20Inform=C3=A0tica?= <35220662+Solatec@users.noreply.github.com> Date: Fri, 15 Jun 2018 12:27:29 +0200 Subject: [PATCH 04/17] Update strings.xml --- commons/src/main/res/values-es/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-es/strings.xml b/commons/src/main/res/values-es/strings.xml index 6194ebb69..fbedfa3b8 100644 --- a/commons/src/main/res/values-es/strings.xml +++ b/commons/src/main/res/values-es/strings.xml @@ -211,8 +211,8 @@ No - WARNING: You are deleting a folder - WARNING: You are deleting %d folders + ADVERTENCIA: está eliminando una carpeta + ADVERTENCIA: está eliminando %d carpetas From efd7451c6104462a9b17e889d1fabc4e5f8c482d Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Fri, 15 Jun 2018 13:09:13 +0200 Subject: [PATCH 05/17] removing a copypaste error --- commons/src/main/res/values-ca/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/src/main/res/values-ca/strings.xml b/commons/src/main/res/values-ca/strings.xml index 8a6451252..ec513cb37 100644 --- a/commons/src/main/res/values-ca/strings.xml +++ b/commons/src/main/res/values-ca/strings.xml @@ -212,7 +212,7 @@ ADVERTIMENT: s\'eliminarà una carpeta - ADVERTIMENT: s\'eliminaran %d carpetes WARNING: You are deleting %d folders + ADVERTIMENT: s\'eliminaran %d carpetes From b49229d6a6b0a86677a45855d0d9361c09fb477d Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 15 Jun 2018 13:53:38 +0200 Subject: [PATCH 06/17] do not scroll the pattern tab while inserting it --- build.gradle | 2 +- .../commons/adapters/PasswordTypesAdapter.kt | 5 ++- .../commons/dialogs/SecurityDialog.kt | 2 +- .../commons/interfaces/SecurityTab.kt | 4 +- .../commons/views/FingerprintTab.kt | 2 +- .../commons/views/MyScrollView.kt | 37 +++++++++++++++++++ .../commons/views/PatternTab.kt | 17 +++++++-- .../simplemobiletools/commons/views/PinTab.kt | 2 +- .../src/main/res/layout/dialog_security.xml | 4 +- 9 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 commons/src/main/kotlin/com/simplemobiletools/commons/views/MyScrollView.kt diff --git a/build.gradle b/build.gradle index da06ed804..e5b464f48 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.1.14' + propVersionName = '4.1.16' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/PasswordTypesAdapter.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/PasswordTypesAdapter.kt index 17b3aa5a5..c82e49201 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/PasswordTypesAdapter.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/PasswordTypesAdapter.kt @@ -10,15 +10,16 @@ import com.simplemobiletools.commons.R import com.simplemobiletools.commons.extensions.isFingerPrintSensorAvailable import com.simplemobiletools.commons.interfaces.HashListener import com.simplemobiletools.commons.interfaces.SecurityTab +import com.simplemobiletools.commons.views.MyScrollView -class PasswordTypesAdapter(val context: Context, val requiredHash: String, val hashListener: HashListener) : PagerAdapter() { +class PasswordTypesAdapter(val context: Context, val requiredHash: String, val hashListener: HashListener, val scrollView: MyScrollView) : PagerAdapter() { private val tabs = SparseArray() override fun instantiateItem(container: ViewGroup, position: Int): Any { val view = LayoutInflater.from(context).inflate(layoutSelection(position), container, false) container.addView(view) tabs.put(position, view as SecurityTab) - (view as SecurityTab).initTab(requiredHash, hashListener) + (view as SecurityTab).initTab(requiredHash, hashListener, scrollView) return view } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt index b7a1258e8..09626bf18 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt @@ -27,7 +27,7 @@ class SecurityDialog(val activity: Activity, val requiredHash: String, val showT view.apply { viewPager = findViewById(R.id.dialog_tab_view_pager) viewPager.offscreenPageLimit = 2 - tabsAdapter = PasswordTypesAdapter(context, requiredHash, this@SecurityDialog) + tabsAdapter = PasswordTypesAdapter(context, requiredHash, this@SecurityDialog, dialog_scrollview) viewPager.adapter = tabsAdapter viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { override fun onPageScrollStateChanged(state: Int) { diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/interfaces/SecurityTab.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/interfaces/SecurityTab.kt index 87ca89625..fee4b8a93 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/interfaces/SecurityTab.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/interfaces/SecurityTab.kt @@ -1,7 +1,9 @@ package com.simplemobiletools.commons.interfaces +import com.simplemobiletools.commons.views.MyScrollView + interface SecurityTab { - fun initTab(requiredHash: String, listener: HashListener) + fun initTab(requiredHash: String, listener: HashListener, scrollView: MyScrollView) fun visibilityChanged(isVisible: Boolean) } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/views/FingerprintTab.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/views/FingerprintTab.kt index 846491729..98696fe9a 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/views/FingerprintTab.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/views/FingerprintTab.kt @@ -38,7 +38,7 @@ class FingerprintTab(context: Context, attrs: AttributeSet) : RelativeLayout(con } } - override fun initTab(requiredHash: String, listener: HashListener) { + override fun initTab(requiredHash: String, listener: HashListener, scrollView: MyScrollView) { hashListener = listener } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/views/MyScrollView.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/views/MyScrollView.kt new file mode 100644 index 000000000..c36a6c6d2 --- /dev/null +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/views/MyScrollView.kt @@ -0,0 +1,37 @@ +package com.simplemobiletools.commons.views + +import android.content.Context +import android.util.AttributeSet +import android.view.MotionEvent +import android.widget.ScrollView + +class MyScrollView : ScrollView { + var isScrollable = true + + constructor(context: Context) : super(context) + + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) + + constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) + + override fun onTouchEvent(ev: MotionEvent): Boolean { + return when (ev.action) { + MotionEvent.ACTION_DOWN -> { + if (isScrollable) { + super.onTouchEvent(ev) + } else { + isScrollable + } + } + else -> super.onTouchEvent(ev) + } + } + + override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean { + return if (!isScrollable) { + false + } else { + super.onInterceptTouchEvent(ev) + } + } +} diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/views/PatternTab.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/views/PatternTab.kt index 2faca0a0c..15f8866a6 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/views/PatternTab.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/views/PatternTab.kt @@ -3,6 +3,7 @@ package com.simplemobiletools.commons.views import android.content.Context import android.os.Handler import android.util.AttributeSet +import android.view.MotionEvent import android.widget.RelativeLayout import com.andrognito.patternlockview.PatternLockView import com.andrognito.patternlockview.listener.PatternLockViewListener @@ -19,12 +20,22 @@ import kotlinx.android.synthetic.main.tab_pattern.view.* class PatternTab(context: Context, attrs: AttributeSet) : RelativeLayout(context, attrs), SecurityTab { private var hash = "" private var requiredHash = "" + private var scrollView: MyScrollView? = null lateinit var hashListener: HashListener override fun onFinishInflate() { super.onFinishInflate() val textColor = context.baseConfig.textColor context.updateTextColors(pattern_lock_holder) + + pattern_lock_view.setOnTouchListener { v, event -> + when (event.action) { + MotionEvent.ACTION_DOWN -> scrollView?.isScrollable = false + MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> scrollView?.isScrollable = true + } + false + } + pattern_lock_view.correctStateColor = context.baseConfig.primaryColor pattern_lock_view.normalStateColor = textColor pattern_lock_view.addPatternLockListener(object : PatternLockViewListener { @@ -36,13 +47,13 @@ class PatternTab(context: Context, attrs: AttributeSet) : RelativeLayout(context override fun onStarted() {} - override fun onProgress(progressPattern: MutableList?) { - } + override fun onProgress(progressPattern: MutableList?) {} }) } - override fun initTab(requiredHash: String, listener: HashListener) { + override fun initTab(requiredHash: String, listener: HashListener, scrollView: MyScrollView) { this.requiredHash = requiredHash + this.scrollView = scrollView hash = requiredHash hashListener = listener } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/views/PinTab.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/views/PinTab.kt index 47ecb3226..35b397962 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/views/PinTab.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/views/PinTab.kt @@ -38,7 +38,7 @@ class PinTab(context: Context, attrs: AttributeSet) : RelativeLayout(context, at pin_ok.applyColorFilter(context.baseConfig.textColor) } - override fun initTab(requiredHash: String, listener: HashListener) { + override fun initTab(requiredHash: String, listener: HashListener, scrollView: MyScrollView) { this.requiredHash = requiredHash hash = requiredHash hashListener = listener diff --git a/commons/src/main/res/layout/dialog_security.xml b/commons/src/main/res/layout/dialog_security.xml index b64c74f0e..0ca6d5e77 100644 --- a/commons/src/main/res/layout/dialog_security.xml +++ b/commons/src/main/res/layout/dialog_security.xml @@ -1,5 +1,5 @@ - - + From 8450994a0388a1b2bf24173b9e94d3075330152a Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 15 Jun 2018 14:17:53 +0200 Subject: [PATCH 07/17] adding a new constant used for saving protection state --- build.gradle | 2 +- .../kotlin/com/simplemobiletools/commons/helpers/Constants.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e5b464f48..3a6851619 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.1.16' + propVersionName = '4.1.17' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt index c19b2e8f3..01b798da7 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt @@ -136,6 +136,7 @@ const val SORT_BY_ARTIST = 4096 const val SORT_BY_DURATION = 8192 // security +const val WAS_PROTECTION_HANDLED = "was_protection_handled" const val PROTECTION_PATTERN = 0 const val PROTECTION_PIN = 1 const val PROTECTION_FINGERPRINT = 2 From fac6e92dc22f3007db197d502a1a2ee1a1f0988e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20F=C4=B1r=C4=B1nc=C4=B1?= Date: Fri, 15 Jun 2018 23:00:36 +0300 Subject: [PATCH 08/17] Update strings.xml --- commons/src/main/res/values-tr/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-tr/strings.xml b/commons/src/main/res/values-tr/strings.xml index 9effcb410..9439a73c7 100644 --- a/commons/src/main/res/values-tr/strings.xml +++ b/commons/src/main/res/values-tr/strings.xml @@ -212,8 +212,8 @@ Hayır - WARNING: You are deleting a folder - WARNING: You are deleting %d folders + UYARI: Bir klasör siliyorsunuz + UYARI: %d klasör siliyorsunuz From 953c6b5471ee9695e140b168a3c00413331e571c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 Jun 2018 09:13:46 +0200 Subject: [PATCH 09/17] use the direct way of selecting items with long presses at recycler view adapter --- .../commons/adapters/MyRecyclerViewAdapter.kt | 6 +++++- .../com/simplemobiletools/commons/dialogs/SecurityDialog.kt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt index aabe19991..5168cb675 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt @@ -196,7 +196,11 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc lastLongPressedItem = if (lastLongPressedItem == -1) { position } else { - selectItemRange(lastLongPressedItem, position, Math.min(lastLongPressedItem, position), Math.max(lastLongPressedItem, position)) + val min = Math.min(lastLongPressedItem, position) + val max = Math.max(lastLongPressedItem, position) + for (i in min..max) { + toggleItemSelection(true, i) + } -1 } } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt index 09626bf18..78327c6df 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SecurityDialog.kt @@ -79,7 +79,7 @@ class SecurityDialog(val activity: Activity, val requiredHash: String, val showT dialog = AlertDialog.Builder(activity) .setOnCancelListener { onCancelFail() } - .setNegativeButton(R.string.cancel, { dialog, which -> onCancelFail() }) + .setNegativeButton(R.string.cancel) { dialog, which -> onCancelFail() } .create().apply { activity.setupDialogStuff(view, this) } From cc510d2a6607689e5e328320b8c7ff48db45877c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 Jun 2018 21:36:07 +0200 Subject: [PATCH 10/17] rewrite the recyclerview adapter, store viewholders instead of views --- build.gradle | 2 +- .../adapters/FilepickerItemsAdapter.kt | 4 +- .../commons/adapters/MyRecyclerViewAdapter.kt | 49 +++++++++++++------ 3 files changed, 36 insertions(+), 19 deletions(-) diff --git a/build.gradle b/build.gradle index 3a6851619..4cdd829a8 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.1.17' + propVersionName = '4.2.0' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt index fbc9f9bea..9f09f3bed 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt @@ -29,9 +29,9 @@ class FilepickerItemsAdapter(activity: BaseSimpleActivity, val fileDirItems: Lis override fun getActionMenuId() = 0 - override fun prepareItemSelection(view: View) {} + override fun prepareItemSelection(viewHolder: ViewHolder) {} - override fun markItemSelection(select: Boolean, view: View?) {} + override fun markItemHolderSelection(select: Boolean, viewHolder: ViewHolder?) {} override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.filepicker_list_item, parent) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt index 5168cb675..187d4b458 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt @@ -28,7 +28,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected var primaryColor = baseConfig.primaryColor protected var textColor = baseConfig.textColor protected var backgroundColor = baseConfig.backgroundColor - protected var itemViews = SparseArray() + protected var itemHolders = SparseArray() protected val selectedPositions = HashSet() protected var positionOffset = 0 @@ -39,9 +39,9 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc abstract fun getActionMenuId(): Int - abstract fun prepareItemSelection(view: View) + abstract fun prepareItemSelection(viewHolder: ViewHolder) - abstract fun markItemSelection(select: Boolean, view: View?) + abstract fun markItemHolderSelection(select: Boolean, viewHolder: ViewHolder?) abstract fun prepareActionMode(menu: Menu) @@ -53,15 +53,15 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected fun toggleItemSelection(select: Boolean, pos: Int) { if (select) { - if (itemViews[pos] != null) { - prepareItemSelection(itemViews[pos]) - selectedPositions.add(pos) + if (itemHolders[pos] != null) { + prepareItemSelection(itemHolders[pos]) } + selectedPositions.add(pos) } else { selectedPositions.remove(pos) } - markItemSelection(select, itemViews[pos]) + markItemHolderSelection(select, itemHolders[pos]) if (selectedPositions.isEmpty()) { finishActMode() @@ -236,7 +236,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc override fun onDestroyActionMode(actionMode: ActionMode?) { super.onDestroyActionMode(actionMode) selectedPositions.forEach { - markItemSelection(false, itemViews[it]) + markItemHolderSelection(false, itemHolders[it]) } selectedPositions.clear() actBarTextView?.text = "" @@ -251,23 +251,40 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc } protected fun bindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int, view: View) { - itemViews.put(position, view) + itemHolders.put(position, holder) toggleItemSelection(selectedPositions.contains(position), position) holder.itemView.tag = holder } + override fun onViewRecycled(holder: ViewHolder) { + super.onViewRecycled(holder) + val pos = itemHolders.indexOfValue(holder) + try { + if (pos != -1) { + itemHolders.removeAt(pos) + } + } catch (ignored: ArrayIndexOutOfBoundsException) { + } + } + protected fun removeSelectedItems() { + val newViewHolders = SparseArray() + val cnt = itemHolders.size() + for (i in 0..cnt) { + if (selectedPositions.contains(i)) { + continue + } + + val view = itemHolders.get(i, null) + val newIndex = i - selectedPositions.count { it <= i } + newViewHolders.put(newIndex, view) + } + itemHolders = newViewHolders + selectedPositions.sortedDescending().forEach { notifyItemRemoved(it + positionOffset) - itemViews.put(it, null) } - val newItems = SparseArray() - (0 until itemViews.size()) - .filter { itemViews[it] != null } - .forEachIndexed { curIndex, i -> newItems.put(curIndex, itemViews[i]) } - - itemViews = newItems finishActMode() fastScroller?.measureRecyclerView() } From 031de40e48a2fcf861022086867615301d66ce80 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 Jun 2018 21:44:21 +0200 Subject: [PATCH 11/17] rename itemHolders to viewHolders --- build.gradle | 2 +- .../adapters/FilepickerItemsAdapter.kt | 2 +- .../commons/adapters/MyRecyclerViewAdapter.kt | 24 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index 4cdd829a8..5ff977f1b 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.2.0' + propVersionName = '4.2.1' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt index 9f09f3bed..a1f378e73 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt @@ -31,7 +31,7 @@ class FilepickerItemsAdapter(activity: BaseSimpleActivity, val fileDirItems: Lis override fun prepareItemSelection(viewHolder: ViewHolder) {} - override fun markItemHolderSelection(select: Boolean, viewHolder: ViewHolder?) {} + override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {} override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.filepicker_list_item, parent) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt index 187d4b458..5c0cd5aba 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt @@ -28,7 +28,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected var primaryColor = baseConfig.primaryColor protected var textColor = baseConfig.textColor protected var backgroundColor = baseConfig.backgroundColor - protected var itemHolders = SparseArray() + protected var viewHolders = SparseArray() protected val selectedPositions = HashSet() protected var positionOffset = 0 @@ -41,7 +41,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc abstract fun prepareItemSelection(viewHolder: ViewHolder) - abstract fun markItemHolderSelection(select: Boolean, viewHolder: ViewHolder?) + abstract fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) abstract fun prepareActionMode(menu: Menu) @@ -53,15 +53,15 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected fun toggleItemSelection(select: Boolean, pos: Int) { if (select) { - if (itemHolders[pos] != null) { - prepareItemSelection(itemHolders[pos]) + if (viewHolders[pos] != null) { + prepareItemSelection(viewHolders[pos]) } selectedPositions.add(pos) } else { selectedPositions.remove(pos) } - markItemHolderSelection(select, itemHolders[pos]) + markViewHolderSelection(select, viewHolders[pos]) if (selectedPositions.isEmpty()) { finishActMode() @@ -236,7 +236,7 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc override fun onDestroyActionMode(actionMode: ActionMode?) { super.onDestroyActionMode(actionMode) selectedPositions.forEach { - markItemHolderSelection(false, itemHolders[it]) + markViewHolderSelection(false, viewHolders[it]) } selectedPositions.clear() actBarTextView?.text = "" @@ -251,17 +251,17 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc } protected fun bindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int, view: View) { - itemHolders.put(position, holder) + viewHolders.put(position, holder) toggleItemSelection(selectedPositions.contains(position), position) holder.itemView.tag = holder } override fun onViewRecycled(holder: ViewHolder) { super.onViewRecycled(holder) - val pos = itemHolders.indexOfValue(holder) + val pos = viewHolders.indexOfValue(holder) try { if (pos != -1) { - itemHolders.removeAt(pos) + viewHolders.removeAt(pos) } } catch (ignored: ArrayIndexOutOfBoundsException) { } @@ -269,17 +269,17 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected fun removeSelectedItems() { val newViewHolders = SparseArray() - val cnt = itemHolders.size() + val cnt = viewHolders.size() for (i in 0..cnt) { if (selectedPositions.contains(i)) { continue } - val view = itemHolders.get(i, null) + val view = viewHolders.get(i, null) val newIndex = i - selectedPositions.count { it <= i } newViewHolders.put(newIndex, view) } - itemHolders = newViewHolders + viewHolders = newViewHolders selectedPositions.sortedDescending().forEach { notifyItemRemoved(it + positionOffset) From 67c4981077ea76a7a57f4eb2ecb2cd14925d0e09 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 Jun 2018 23:27:07 +0200 Subject: [PATCH 12/17] differentiate photo and raw files --- build.gradle | 2 +- .../com/simplemobiletools/commons/extensions/File.kt | 2 ++ .../com/simplemobiletools/commons/extensions/String.kt | 8 +++----- .../com/simplemobiletools/commons/helpers/Constants.kt | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 5ff977f1b..c04b0c59a 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.2.1' + propVersionName = '4.2.2' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt index c30419e83..60bebd4b0 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt @@ -3,6 +3,7 @@ package com.simplemobiletools.commons.extensions import android.content.Context import com.simplemobiletools.commons.helpers.audioExtensions import com.simplemobiletools.commons.helpers.photoExtensions +import com.simplemobiletools.commons.helpers.rawExtensions import com.simplemobiletools.commons.helpers.videoExtensions import com.simplemobiletools.commons.models.FileDirItem import java.io.File @@ -12,6 +13,7 @@ fun File.isGif() = absolutePath.endsWith(".gif", true) fun File.isVideoFast() = videoExtensions.any { absolutePath.endsWith(it, true) } fun File.isImageFast() = photoExtensions.any { absolutePath.endsWith(it, true) } fun File.isAudioFast() = audioExtensions.any { absolutePath.endsWith(it, true) } +fun File.isRawFast() = rawExtensions.any { absolutePath.endsWith(it, true) } fun File.isImageSlow() = absolutePath.isImageFast() || getMimeType().startsWith("image") fun File.isVideoSlow() = absolutePath.isVideoFast() || getMimeType().startsWith("video") diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt index c8eb9c8c1..9969c2bf7 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt @@ -9,10 +9,7 @@ import android.media.MediaMetadataRetriever import android.text.Spannable import android.text.SpannableString import android.text.style.ForegroundColorSpan -import com.simplemobiletools.commons.helpers.OTG_PATH -import com.simplemobiletools.commons.helpers.audioExtensions -import com.simplemobiletools.commons.helpers.photoExtensions -import com.simplemobiletools.commons.helpers.videoExtensions +import com.simplemobiletools.commons.helpers.* import java.text.SimpleDateFormat import java.util.* @@ -49,13 +46,14 @@ fun String.isPng() = endsWith(".png", true) fun String.isJpg() = endsWith(".jpg", true) or endsWith(".jpeg") -fun String.isDng() = endsWith(".dng", true) +fun String.isRaw() = endsWith(".dng", true) // fast extension checks, not guaranteed to be accurate fun String.isVideoFast() = videoExtensions.any { endsWith(it, true) } fun String.isImageFast() = photoExtensions.any { endsWith(it, true) } fun String.isAudioFast() = audioExtensions.any { endsWith(it, true) } +fun String.isRawFast() = rawExtensions.any { endsWith(it, true) } fun String.isImageSlow() = isImageFast() || getMimeType().startsWith("image") fun String.isVideoSlow() = isVideoFast() || getMimeType().startsWith("video") diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt index 01b798da7..96890923c 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt @@ -173,9 +173,10 @@ const val EVERY_DAY_BIT = MONDAY_BIT or TUESDAY_BIT or WEDNESDAY_BIT or THURSDAY const val WEEK_DAYS_BIT = MONDAY_BIT or TUESDAY_BIT or WEDNESDAY_BIT or THURSDAY_BIT or FRIDAY_BIT const val WEEKENDS_BIT = SATURDAY_BIT or SUNDAY_BIT -val photoExtensions: Array get() = arrayOf(".jpg", ".png", ".jpeg", ".bmp", ".webp", ".dng", ".orf") +val photoExtensions: Array get() = arrayOf(".jpg", ".png", ".jpeg", ".bmp", ".webp") val videoExtensions: Array get() = arrayOf(".mp4", ".mkv", ".webm", ".avi", ".3gp", ".mov", ".m4v", ".3gpp") val audioExtensions: Array get() = arrayOf(".mp3", ".wav", ".wma", ".ogg", ".m4a", ".opus", ".flac") +val rawExtensions: Array get() = arrayOf(".dng", ".orf") val appIconColorStrings = arrayListOf( ".Red", From a1e8b7f3e8c90f651e341c8c22961ab6d641a5cb Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Jun 2018 14:25:18 +0200 Subject: [PATCH 13/17] remove a redundant String isRaw check --- build.gradle | 2 +- .../kotlin/com/simplemobiletools/commons/extensions/String.kt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index c04b0c59a..f3144bcb7 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.2.2' + propVersionName = '4.2.4' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt index 9969c2bf7..2e9d713f7 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt @@ -46,8 +46,6 @@ fun String.isPng() = endsWith(".png", true) fun String.isJpg() = endsWith(".jpg", true) or endsWith(".jpeg") -fun String.isRaw() = endsWith(".dng", true) - // fast extension checks, not guaranteed to be accurate fun String.isVideoFast() = videoExtensions.any { endsWith(it, true) } From f0312e09766a87c9c5d97a12738729fcc5322ad1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Jun 2018 14:42:06 +0200 Subject: [PATCH 14/17] check Raw at isImageVideoGif too --- build.gradle | 2 +- .../kotlin/com/simplemobiletools/commons/extensions/File.kt | 2 +- .../kotlin/com/simplemobiletools/commons/extensions/String.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index f3144bcb7..b39370a44 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.2.4' + propVersionName = '4.2.5' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt index 60bebd4b0..559712a54 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/File.kt @@ -8,7 +8,7 @@ import com.simplemobiletools.commons.helpers.videoExtensions import com.simplemobiletools.commons.models.FileDirItem import java.io.File -fun File.isImageVideoGif() = absolutePath.isImageFast() || absolutePath.isVideoFast() || absolutePath.isGif() +fun File.isImageVideoGif() = absolutePath.isImageFast() || absolutePath.isVideoFast() || absolutePath.isGif() || absolutePath.isRawFast() fun File.isGif() = absolutePath.endsWith(".gif", true) fun File.isVideoFast() = videoExtensions.any { absolutePath.endsWith(it, true) } fun File.isImageFast() = photoExtensions.any { absolutePath.endsWith(it, true) } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt index 2e9d713f7..df4611f68 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/String.kt @@ -38,7 +38,7 @@ fun String.isAValidFilename(): Boolean { return true } -fun String.isImageVideoGif() = isImageFast() || isVideoFast() || isGif() +fun String.isImageVideoGif() = isImageFast() || isVideoFast() || isGif() || isRawFast() fun String.isGif() = endsWith(".gif", true) From f9af0153b831d13cfcea394767c6449ad364404a Mon Sep 17 00:00:00 2001 From: gregory678 Date: Mon, 18 Jun 2018 20:31:31 +0200 Subject: [PATCH 15/17] PL translation update [2018.06.18] --- commons/src/main/res/values-pl/strings.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/commons/src/main/res/values-pl/strings.xml b/commons/src/main/res/values-pl/strings.xml index a7de3398e..f13161e83 100644 --- a/commons/src/main/res/values-pl/strings.xml +++ b/commons/src/main/res/values-pl/strings.xml @@ -214,8 +214,9 @@ Nie - WARNING: You are deleting a folder - WARNING: You are deleting %d folders + UWAGA: usuwasz folder + UWAGA: usuwasz %d foldery + UWAGA: usuwasz %d folderów @@ -353,8 +354,8 @@ Ustawienia - Dostosuj kolory - Customize widget colors + Dostosuj kolory aplikacji + Dostosuj kolory widżetu    Wymuś używanie przez aplikację języka angielskiego    Nie pokazuj okna \'Co nowego\' po uruchomieniu aplikacji    Pokazuj ukryte elementy @@ -494,7 +495,7 @@            Cześć!

           Dajemy Ci znać, że ostatnio wyszła nowa aplikacja:

%2$s

-            Możesz ją pobrać, klikając tytuł.

+ Możesz ją pobrać, klikając powyższy odnośnik.

           Dziękujemy!        ]]>
From 57c986e40604713c4ae0c2a8043f50f44ac6b136 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Jun 2018 22:48:23 +0200 Subject: [PATCH 16/17] update version to 4.2.6 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b39370a44..88ebb610e 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.2.5' + propVersionName = '4.2.6' kotlin_version = '1.2.50' support_libs = '27.1.1' } From e2c7ef7ca16d99e56ada31c95bebc81602b08014 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 19 Jun 2018 22:41:10 +0200 Subject: [PATCH 17/17] adding some new Favorite related strings --- build.gradle | 2 +- commons/src/main/res/values-ar/strings.xml | 530 ++++++++++++++++++ commons/src/main/res/values-az/strings.xml | 6 + commons/src/main/res/values-br/strings.xml | 6 + commons/src/main/res/values-ca/strings.xml | 8 +- commons/src/main/res/values-cs/strings.xml | 6 + commons/src/main/res/values-da/strings.xml | 6 + commons/src/main/res/values-de/strings.xml | 6 + commons/src/main/res/values-el/strings.xml | 6 + commons/src/main/res/values-es/strings.xml | 6 + commons/src/main/res/values-fi/strings.xml | 6 + commons/src/main/res/values-fr/strings.xml | 6 + commons/src/main/res/values-gl/strings.xml | 6 + .../src/main/res/values-hi-rIN/strings.xml | 6 + commons/src/main/res/values-hr/strings.xml | 6 + commons/src/main/res/values-hu/strings.xml | 6 + commons/src/main/res/values-id/strings.xml | 6 + commons/src/main/res/values-it/strings.xml | 6 + commons/src/main/res/values-iw/strings.xml | 6 + commons/src/main/res/values-ja/strings.xml | 6 + .../src/main/res/values-ko-rKR/strings.xml | 6 + commons/src/main/res/values-lt/strings.xml | 6 + commons/src/main/res/values-nb/strings.xml | 6 + commons/src/main/res/values-nl/strings.xml | 6 + commons/src/main/res/values-no/strings.xml | 6 + commons/src/main/res/values-pl/strings.xml | 6 + .../src/main/res/values-pt-rBR/strings.xml | 6 + commons/src/main/res/values-pt/strings.xml | 6 + commons/src/main/res/values-ru/strings.xml | 6 + commons/src/main/res/values-sk/strings.xml | 6 + commons/src/main/res/values-sv/strings.xml | 6 + commons/src/main/res/values-tr/strings.xml | 6 + .../src/main/res/values-zh-rCN/strings.xml | 6 + .../src/main/res/values-zh-rTW/strings.xml | 6 + commons/src/main/res/values/strings.xml | 6 + 35 files changed, 730 insertions(+), 2 deletions(-) create mode 100644 commons/src/main/res/values-ar/strings.xml diff --git a/build.gradle b/build.gradle index 88ebb610e..c9b93eb05 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '4.2.6' + propVersionName = '4.2.8' kotlin_version = '1.2.50' support_libs = '27.1.1' } diff --git a/commons/src/main/res/values-ar/strings.xml b/commons/src/main/res/values-ar/strings.xml new file mode 100644 index 000000000..dee8cc1fb --- /dev/null +++ b/commons/src/main/res/values-ar/strings.xml @@ -0,0 +1,530 @@ + + OK + Cancel + Save as + File saved successfully + Invalid file format + Out of memory error + An error occurred: %s + Open with + No valid app found + Set as + Value copied to clipboard + Unknown + Always + Never + Details + Notes + Deleting folder \'%s\' + + + المفضلة + Add favorites + اضافة الى المفضلة + حذف من المفضلة + + + Search + Type in at least 2 characters to start the search. + + + Filter + No items found. + Change filter + + + Storage permission is required + Contacts permission is required + Camera permission is required + Audio permission is required + + + Rename file + Rename folder + Could not rename the file + Could not rename the folder + Folder name must not be empty + A folder with that name already exists + Cannot rename the root folder of a storage + Folder renamed successfully + Renaming folder + Filename cannot be empty + Filename contains invalid characters + Filename \'%s\' contains invalid characters + Extension cannot be empty + Source file %s doesn\'t exist + + + Copy + Move + Copy / Move + Copy to + Move to + Source + Destination + Select destination + Click here to select destination + Could not write to the selected destination + Please select a destination + Source and destination cannot be the same + Could not copy the files + Copying… + Files copied successfully + An error occurred + Moving… + Files moved successfully + Some files could not be moved + Some files could not be copied + No files selected + Saving… + Could not create folder %s + Could not create file %s + + + Create new + Folder + File + Create new folder + A file or folder with that name already exists + The name contains invalid characters + Please enter a name + An unknown error occurred + + + File \"%s\" already exists + File \"%s\" already exists. Overwrite? + Folder \"%s\" already exists + Merge + Overwrite + Skip + Append with \'_1\' + Apply to all + + + Select a folder + Select a file + Confirm external storage access + Please choose the root folder of the SD card on the next screen, to grant write access + If you don\'t see the SD card, try this + Confirm selection + + + %d item + %d items + + + + + %d item + %d items + + + + Select storage + Internal + SD Card + Root + Wrong folder selected, please select the root folder of your SD card + SD card and OTG device paths cannot be the same + + + Properties + Path + Items selected + Direct children count + Total files count + Resolution + Duration + Artist + Album + Focal length + Exposure time + ISO speed + F-number + Camera + EXIF + Song title + + + Background color + Text color + Primary color + Foreground color + App icon color + Restore defaults + Change color + Theme + Changing a color will make it switch to Custom theme + Save + Discard + Undo changes + Are you sure you want to undo your changes? + You have unsaved changes. Save before exit? + Apply colors to all Simple Apps + Colors updated successfully. A new Theme called \'Shared\' has been added, please use that for updating all app colors in the future. + + Simple Thank You to unlock this function and support the development. Thanks! + ]]> + + + + Light + Dark + Solarized + Dark red + Black & White + Custom + Shared + + + What\'s new + * only the bigger updates are listed here, there are always some smaller improvements too + + + Delete + Remove + Rename + Share + Share via + Select all + Hide + Unhide + Hide folder + Unhide folder + Temporarily show hidden + Stop showing hidden media + You cannot share this much content at once + + + Sort by + Name + Size + Last modified + Date taken + Title + Filename + Extension + Ascending + Descending + Use for this folder only + + + Are you sure you want to proceed with the deletion? + Are you sure you want to delete %s? + Are you sure you want to move %s to Recycle Bin? + Do not ask again in this session + Yes + No + + + WARNING: You are deleting a folder + WARNING: You are deleting %d folders + + + + PIN + Enter PIN + Please enter a PIN + Wrong PIN + Repeat PIN + Pattern + Insert pattern + Wrong pattern + Repeat pattern + Fingerprint + Add fingerprint + Please place your finger on the fingerprint sensor + Authentication failed + Authentication blocked, please try again in a moment + You have no fingerprints registered, please add some in the Settings of your device + Go to Settings + Password setup successfully. Please reinstall the app in case you forget it. + Protection setup successfully. Please reinstall the app in case of problems with reseting it. + + + Tomorrow + seconds + minutes + hours + days + + + %d second + %d seconds + + + %d minute + %d minutes + + + %d hour + %d hours + + + %d day + %d days + + + %d week + %d weeks + + + %d month + %d months + + + %d year + %d years + + + + + %d second + %d seconds + + + %d minute + %d minutes + + + %d hour + %d hours + + + + + %d second before + %d seconds before + + + %d minute before + %d minutes before + + + %d hour before + %d hours before + + + %d day before + %d days before + + + + + %d second + %d seconds + + + %d minute + %d minutes + + + %d hour + %d hours + + + + Time remaining till the alarm goes off:\n%s + Please make sure the alarm works properly before relying on it. It could misbehave due to system restrictions related to battery saving. + Please make sure the reminders work properly before relying on them. They could misbehave due to system restrictions related to battery saving. + + + Alarm + Snooze + Dismiss + No reminder + At start + System sounds + Your sounds + Add a new sound + No sound + + + Settings + Customize colors + Customize widget colors + Use English language + Avoid showing What\'s New on startup + Show hidden items + Font size + Small + Medium + Large + Extra large + Password protect hidden item visibility + Password protect the whole application + Keep old last-modified value at file copy/move/rename + Show an info bubble at scrolling items by scrollbar dragging + Prevent phone from sleeping while the app is in foreground + Always skip delete confirmation dialog + Enable pull-to-refresh from the top + Use 24-hour time format + Start week on Sunday + Widgets + Always use same snooze time + Snooze time + Vibrate on button press + Move items in Recycle Bin instead of deleting + Recycle Bin cleaning interval + Empty Recycle Bin + Recycle Bin location + Force portrait mode + + + Visibility + Security + Scrolling + File operations + Recycle Bin + Saving + Startup + Text + + + Importing… + Exporting… + Importing successful + Exporting successful + Importing failed + Exporting failed + Importing some entries failed + Exporting some entries failed + No entries for exporting have been found + + + OTG + Please choose the root folder of the OTG device on the next screen, to grant access + Wrong folder selected, please select the root folder of your OTG device + + + January + February + March + April + May + June + July + August + September + October + November + December + + + in January + in February + in March + in April + in May + in June + in July + in August + in September + in October + in November + in December + + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday + Sunday + + M + T + W + T + F + S + S + + Mon + Tue + Wed + Thu + Fri + Sat + Sun + + + About + For the source codes visit + Send your feedback or suggestions to + More apps + Third party licences + Invite friends + Hey, come check out %1$s at %2$s + Invite via + Rate us + Donate + Donate + Follow us + v %1$s\nCopyright © Simple Mobile Tools %2$d + Additional info + App version: %s + Device OS: %s + +
+ hope you are enjoying the app. It contains no ads, please support its development by purchasing the Simple Thank You app, it will also prevent this dialog from showing up again.

+ You can find more donating options here.

+ Thank you! + ]]> +
+ Purchase + Please update Simple Thank You to the latest version + + + +
+ just letting you know that a new app has been released recently:

+ %2$s

+ You can download it by pressing the title.

+ Thanks + ]]> +
+ + + Frequently asked questions + Before you ask a question, please first read the + How come I don\'t see this apps widget on the list of widgets? + It is most likely because you moved the app on an SD card. There is an Android system limitation which hides the given app widgets + in that case. The only solution is to move the app back onto the Internal Storage via your device settings. + I want to support you, but I cannot donate money. Is there anything else I can do? + Yes, of course. You can spread the word about the apps or give good feedback and ratings. You can also help by translating the apps in a new language, or just update some existing translations. + You can find the guide at https://github.com/SimpleMobileTools/General-Discussion , or just shoot me a message at hello@simplemobiletools.com if you need help. + I deleted some files by mistake, how can I recover them? + Sadly, you cannot. Files are deleted instantly after the confirmation dialog, there is no trashbin available. + I don\'t like the widget colors, can I change them? + Yep, as you drag a widget on your home screen a widget config screen appears. You will see colored squares at the bottom left corner, just press them to pick a new color. You can use the slider for adjusting the alpha too. + Can I somehow restore deleted files? + If they were really deleted, you cannot. However, you can enable using a Recycle Bin instead of deleting in the app settings. That will just move the files in it instead of deleting them. You can customize the Recycle Bin location, emptying interval, or empty it manually. + + + This app uses the following third party libraries to make my life easier. Thank you. + Third party licences + Kotlin (programming language) + Subsampling Scale Image View (zoomable imageviews) + Glide (image loading and caching) + Picasso (image loading and caching) + Android Image Cropper (image crop and rotate) + RecyclerView MultiSelect (selecting multiple list items) + RtlViewPager (right to left swiping) + Joda-Time (Java date replacement) + Stetho (debugging databases) + Otto (event bus) + PhotoView (zoomable GIFs) + PatternLockView (pattern protection) + Reprint (fingerprint protection) + Gif Drawable (loading GIFs) + AutoFitTextView (resizing text) + Robolectric (testing framework) + Espresso (testing helper) + Gson (JSON parser) + Leak Canary (memory leak detector) + Number Picker (customizable number picker) +
diff --git a/commons/src/main/res/values-az/strings.xml b/commons/src/main/res/values-az/strings.xml index fd3edf34e..486bfd4f6 100644 --- a/commons/src/main/res/values-az/strings.xml +++ b/commons/src/main/res/values-az/strings.xml @@ -17,6 +17,12 @@ Qeydlər Deleting folder \'%s\' + + Sevimlilər + Sevimlilər əlavə et + Sevimlilərə əlavə et + Sevimlilərdən sil + Axtar Axtarışa başlamaq üçün ən az 2 simvol yazın. diff --git a/commons/src/main/res/values-br/strings.xml b/commons/src/main/res/values-br/strings.xml index d2a80e16f..4bb4b6d90 100644 --- a/commons/src/main/res/values-br/strings.xml +++ b/commons/src/main/res/values-br/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Search Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-ca/strings.xml b/commons/src/main/res/values-ca/strings.xml index ec513cb37..7fe576b5b 100644 --- a/commons/src/main/res/values-ca/strings.xml +++ b/commons/src/main/res/values-ca/strings.xml @@ -15,7 +15,13 @@ Mai Detalls Notes - S'està eliminant la carpeta \'%s\' + S\'està eliminant la carpeta \'%s\' + + + Favorites + Add favorites + Add to favorites + Remove from favorites Buscar diff --git a/commons/src/main/res/values-cs/strings.xml b/commons/src/main/res/values-cs/strings.xml index 512951ead..4417e9967 100644 --- a/commons/src/main/res/values-cs/strings.xml +++ b/commons/src/main/res/values-cs/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Oblíbené + Add favorites + Přidat do oblíbených + Odebrat z oblíbených + Hledat Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-da/strings.xml b/commons/src/main/res/values-da/strings.xml index 0d1abeacc..56162f024 100644 --- a/commons/src/main/res/values-da/strings.xml +++ b/commons/src/main/res/values-da/strings.xml @@ -17,6 +17,12 @@ Noter Sletter mappen \'%s\' + + Bogmærker + Tilføj bogmærker + Føj til bogmærker + Fjern fra bogmærker + Søg Start søgningen ved at skrive mindst to tegn. diff --git a/commons/src/main/res/values-de/strings.xml b/commons/src/main/res/values-de/strings.xml index 95a51d4f7..fdc5443c8 100644 --- a/commons/src/main/res/values-de/strings.xml +++ b/commons/src/main/res/values-de/strings.xml @@ -17,6 +17,12 @@ Notizen Deleting folder \'%s\' + + Favoriten + Favoriten hinzufügen + Zu Favoriten hinzufügen + Aus Favoriten entfernen + Suchen Du musst mindestens 2 Zeichen eingeben, um die Suche zu starten. diff --git a/commons/src/main/res/values-el/strings.xml b/commons/src/main/res/values-el/strings.xml index a0af61d23..02c83c7d1 100644 --- a/commons/src/main/res/values-el/strings.xml +++ b/commons/src/main/res/values-el/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Search Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-es/strings.xml b/commons/src/main/res/values-es/strings.xml index fbedfa3b8..91fc356c6 100644 --- a/commons/src/main/res/values-es/strings.xml +++ b/commons/src/main/res/values-es/strings.xml @@ -17,6 +17,12 @@ Notas Eliminando carpeta \'%s\' + + Favoritos + Add favorites + Agregar a favoritos + Eliminar de favoritos + Buscar Escribe por lo menos dos caracteres para iniciar la búsqueda. diff --git a/commons/src/main/res/values-fi/strings.xml b/commons/src/main/res/values-fi/strings.xml index 63b481d48..fdb28b358 100644 --- a/commons/src/main/res/values-fi/strings.xml +++ b/commons/src/main/res/values-fi/strings.xml @@ -17,6 +17,12 @@ Muistiinpanot Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Haku Syötä ainakin 2 merkkiä hakeaksesi diff --git a/commons/src/main/res/values-fr/strings.xml b/commons/src/main/res/values-fr/strings.xml index b14690148..04e8943fa 100644 --- a/commons/src/main/res/values-fr/strings.xml +++ b/commons/src/main/res/values-fr/strings.xml @@ -17,6 +17,12 @@ Notes Supprimer le dossier \'%s\' + + Favoris + Ajouter des favoris + Ajouter aux favoris + Enlever des favoris + Recherche Tapez au moins 2 caractères pour lancer la recherche. diff --git a/commons/src/main/res/values-gl/strings.xml b/commons/src/main/res/values-gl/strings.xml index 2194c0648..958a44d71 100644 --- a/commons/src/main/res/values-gl/strings.xml +++ b/commons/src/main/res/values-gl/strings.xml @@ -17,6 +17,12 @@ Notas Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Buscar Escribe por lo menos dos caracteres para iniciar la búsqueda. diff --git a/commons/src/main/res/values-hi-rIN/strings.xml b/commons/src/main/res/values-hi-rIN/strings.xml index 4f882b2df..52d30a9e2 100644 --- a/commons/src/main/res/values-hi-rIN/strings.xml +++ b/commons/src/main/res/values-hi-rIN/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Search Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-hr/strings.xml b/commons/src/main/res/values-hr/strings.xml index c0675f4e4..abe90bc5f 100644 --- a/commons/src/main/res/values-hr/strings.xml +++ b/commons/src/main/res/values-hr/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favoriti + Dodaj favorite + Dodaj u favorite + Ukloni iz favorita + Traži Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-hu/strings.xml b/commons/src/main/res/values-hu/strings.xml index 3e2eb5e6a..529bc170d 100644 --- a/commons/src/main/res/values-hu/strings.xml +++ b/commons/src/main/res/values-hu/strings.xml @@ -17,6 +17,12 @@ Jegyzetek Deleting folder \'%s\' + + Kedvencek + Add favorites + Kedvencnek jelölés + Törlés a kedvencek közül + Search Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-id/strings.xml b/commons/src/main/res/values-id/strings.xml index db4ec553e..e9ea4cb33 100644 --- a/commons/src/main/res/values-id/strings.xml +++ b/commons/src/main/res/values-id/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favorit + Tambahkan Favorit + Tambahkan Ke Favorit + Hapus Dari Favorit + Cari Ketik minimal 2 Karakter Untuk Mencari. diff --git a/commons/src/main/res/values-it/strings.xml b/commons/src/main/res/values-it/strings.xml index b96785638..c92e0f959 100644 --- a/commons/src/main/res/values-it/strings.xml +++ b/commons/src/main/res/values-it/strings.xml @@ -17,6 +17,12 @@ Note Eliminazione cartella \'%s\' + + Preferiti + Aggiungi preferiti + Aggiungi ai preferiti + Rimuovi dai preferiti + Cerca Digita almeno 2 caratteri per iniziare la ricerca. diff --git a/commons/src/main/res/values-iw/strings.xml b/commons/src/main/res/values-iw/strings.xml index 125282a39..0529e9238 100644 --- a/commons/src/main/res/values-iw/strings.xml +++ b/commons/src/main/res/values-iw/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Search Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-ja/strings.xml b/commons/src/main/res/values-ja/strings.xml index 967a33991..36397d20c 100644 --- a/commons/src/main/res/values-ja/strings.xml +++ b/commons/src/main/res/values-ja/strings.xml @@ -17,6 +17,12 @@ メモ Deleting folder \'%s\' + + お気に入り + お気に入りを追加 + お気に入りに追加 + お気に入りから削除 + 検索 Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-ko-rKR/strings.xml b/commons/src/main/res/values-ko-rKR/strings.xml index 1cd61f833..3c8ccaa93 100644 --- a/commons/src/main/res/values-ko-rKR/strings.xml +++ b/commons/src/main/res/values-ko-rKR/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + 즐겨찾기 + Add favorites + 즐겨찾기에 추가 + 즐겨찾기에서 제거 + 검색 Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-lt/strings.xml b/commons/src/main/res/values-lt/strings.xml index 264eca3e7..f7b944504 100644 --- a/commons/src/main/res/values-lt/strings.xml +++ b/commons/src/main/res/values-lt/strings.xml @@ -17,6 +17,12 @@ Užrašai Deleting folder \'%s\' + + Mėgiamiausieji + Pridėti mėgiamiausiuosius + pridėti į mėgiamiausiuosius + Pašalinti iš mėgiamiausiųjų + Ieškoti Įvesti mažiausiai 2 simbolius, kad pradėti paiešką. diff --git a/commons/src/main/res/values-nb/strings.xml b/commons/src/main/res/values-nb/strings.xml index 0771e16e0..4d9ac818c 100644 --- a/commons/src/main/res/values-nb/strings.xml +++ b/commons/src/main/res/values-nb/strings.xml @@ -17,6 +17,12 @@ Notes Sletter mappen \'%s\' + + Favoritter + Legg til favoritter + Legg til i favorittene + Fjern fra favorittene + Søk Skriv inn minst 2 tegn for å starte søket. diff --git a/commons/src/main/res/values-nl/strings.xml b/commons/src/main/res/values-nl/strings.xml index 527afe2dd..dd91481b7 100644 --- a/commons/src/main/res/values-nl/strings.xml +++ b/commons/src/main/res/values-nl/strings.xml @@ -17,6 +17,12 @@ Notities Map \'%s\' verwijderen + + Favorieten + Add favorites + Aan favorieten toevoegen + Uit favorieten verwijderen + Zoeken Vul tenminste 2 tekens in. diff --git a/commons/src/main/res/values-no/strings.xml b/commons/src/main/res/values-no/strings.xml index a958d0f41..eee3ccb4b 100644 --- a/commons/src/main/res/values-no/strings.xml +++ b/commons/src/main/res/values-no/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Søk Type in at least 2 characters to start the search. diff --git a/commons/src/main/res/values-pl/strings.xml b/commons/src/main/res/values-pl/strings.xml index f13161e83..fb70c517b 100644 --- a/commons/src/main/res/values-pl/strings.xml +++ b/commons/src/main/res/values-pl/strings.xml @@ -17,6 +17,12 @@ Notatnik Usuwam folder \'%s\' + + Ulubione + Dodaj ulubione + Dodaj do ulubionych + Usuń z ulubionych + Szukaj    Wpisz co najmniej 2 znaki, aby rozpocząć wyszukiwanie. diff --git a/commons/src/main/res/values-pt-rBR/strings.xml b/commons/src/main/res/values-pt-rBR/strings.xml index 6950ce2a3..8a5d81408 100644 --- a/commons/src/main/res/values-pt-rBR/strings.xml +++ b/commons/src/main/res/values-pt-rBR/strings.xml @@ -17,6 +17,12 @@ Notas Deleting folder \'%s\' + + Favoritos + Add favorites + Adicionar aos favoritos + Remover dos favoritos + Pesquisar Digite pelo menos 2 letras para iniciar a pesquisa. diff --git a/commons/src/main/res/values-pt/strings.xml b/commons/src/main/res/values-pt/strings.xml index 6c5eee38f..1f1730ba4 100644 --- a/commons/src/main/res/values-pt/strings.xml +++ b/commons/src/main/res/values-pt/strings.xml @@ -17,6 +17,12 @@ Notas A apagar a pasta \'%s\' + + Favoritos + Add favorites + Adicionar aos favoritos + Remover dos favoritos + Pesquisar Digite, pelo menos, 2 caracteres para iniciar a pesquisa. diff --git a/commons/src/main/res/values-ru/strings.xml b/commons/src/main/res/values-ru/strings.xml index 676ba874e..dae7c73cd 100644 --- a/commons/src/main/res/values-ru/strings.xml +++ b/commons/src/main/res/values-ru/strings.xml @@ -17,6 +17,12 @@ Заметки Удаление папки \"%s\" + + Избранное + Добавить избранные + Добавить в избранное + Убрать из избранного + Поиск Введите как минимум 2 символа для начала поиска. diff --git a/commons/src/main/res/values-sk/strings.xml b/commons/src/main/res/values-sk/strings.xml index c8de2db05..225f15543 100644 --- a/commons/src/main/res/values-sk/strings.xml +++ b/commons/src/main/res/values-sk/strings.xml @@ -17,6 +17,12 @@ Poznámky Odstraňuje sa priečinok \'%s\' + + Obľúbené + Pridať obľúbené + Pridať medzi obľúbené + Odstrániť spomedzi obľúbených + Hľadať Zadajte aspoň 2 znaky pre spustenie hľadania. diff --git a/commons/src/main/res/values-sv/strings.xml b/commons/src/main/res/values-sv/strings.xml index 928b63f42..6c4159f36 100644 --- a/commons/src/main/res/values-sv/strings.xml +++ b/commons/src/main/res/values-sv/strings.xml @@ -17,6 +17,12 @@ Anteckningar Tar bort mappen \'%s\' + + Favoriter + Lägg till favoriter + Lägg till i favoriter + Ta bort från favoriter + Sök Skriv in minst två tecken för att starta sökningen. diff --git a/commons/src/main/res/values-tr/strings.xml b/commons/src/main/res/values-tr/strings.xml index 9439a73c7..4b13f3b82 100644 --- a/commons/src/main/res/values-tr/strings.xml +++ b/commons/src/main/res/values-tr/strings.xml @@ -17,6 +17,12 @@ Notlar \'%s\' klasörü siliniyor + + Favoriler + Favori ekle + Favorilere ekle + Favorilerden kaldır + Ara Aramaya başlamak için en az 2 karakter yazın. diff --git a/commons/src/main/res/values-zh-rCN/strings.xml b/commons/src/main/res/values-zh-rCN/strings.xml index 4368bb222..6042d7a3f 100644 --- a/commons/src/main/res/values-zh-rCN/strings.xml +++ b/commons/src/main/res/values-zh-rCN/strings.xml @@ -17,6 +17,12 @@ 笔记 Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + 搜索 请输入至少两个字符来开始搜索 diff --git a/commons/src/main/res/values-zh-rTW/strings.xml b/commons/src/main/res/values-zh-rTW/strings.xml index 1db431512..610d10c46 100644 --- a/commons/src/main/res/values-zh-rTW/strings.xml +++ b/commons/src/main/res/values-zh-rTW/strings.xml @@ -17,6 +17,12 @@ 筆記 資料夾 \'%s\' 刪除中 + + 我的最愛 + 添加我的最愛 + 加入我的最愛 + 移除我的最愛 + 搜尋 輸入兩個字以上來開始搜尋。 diff --git a/commons/src/main/res/values/strings.xml b/commons/src/main/res/values/strings.xml index a0af61d23..02c83c7d1 100644 --- a/commons/src/main/res/values/strings.xml +++ b/commons/src/main/res/values/strings.xml @@ -17,6 +17,12 @@ Notes Deleting folder \'%s\' + + Favorites + Add favorites + Add to favorites + Remove from favorites + Search Type in at least 2 characters to start the search.