diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt index fb023fa4c..da528a477 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt @@ -1,12 +1,15 @@ package com.simplemobiletools.gallery.dialogs import android.app.AlertDialog +import android.os.Environment import android.support.v7.widget.RecyclerView import android.view.LayoutInflater +import com.simplemobiletools.filepicker.dialogs.FilePickerDialog import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.SimpleActivity import com.simplemobiletools.gallery.adapters.DirectoryAdapter import com.simplemobiletools.gallery.asynctasks.GetDirectoriesAsynctask +import com.simplemobiletools.gallery.helpers.Config import kotlinx.android.synthetic.main.dialog_album_picker.view.* import java.util.* @@ -21,8 +24,8 @@ class PickAlbumDialog(val activity: SimpleActivity, val callback: (path: String) dialog = AlertDialog.Builder(activity) .setTitle(activity.resources.getString(R.string.select_destination)) .setView(view) + .setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() }) .setPositiveButton(R.string.ok, null) - .setNegativeButton(R.string.cancel, null) .create() dialog.setCanceledOnTouchOutside(true) @@ -35,4 +38,17 @@ class PickAlbumDialog(val activity: SimpleActivity, val callback: (path: String) directoriesGrid.adapter = adapter }.execute() } + + fun showOtherFolder() { + val initialPath = Environment.getExternalStorageDirectory().toString() + val showHidden = Config.newInstance(activity).showHiddenFolders + FilePickerDialog(activity, initialPath, false, showHidden, object : FilePickerDialog.OnFilePickerListener { + override fun onSuccess(pickedPath: String) { + callback.invoke(pickedPath) + } + + override fun onFail(error: FilePickerDialog.FilePickerResult) { + } + }) + } } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index d3670d105..1813fdac6 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -32,6 +32,7 @@ Quelle Ziel Ziel auswählen + Other folder Konnte nicht an ausgewähltes Ziel schreiben Bitte wähle ein Ziel Source and destination cannot be the same diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 5b15a44d9..ca679572b 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -32,6 +32,7 @@ Source Destination Select destination + Other folder Could not write to the selected destination Please select a destination Source and destination cannot be the same diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index a77ee7be9..309b83f08 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -32,6 +32,7 @@ Fonte Destinazione Seleziona destinazione + Other folder Impossibile scrivere nella destinazione selezionata Seleziona una destinazione Sorgente e destinazione non possono essere uguali diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 972366c87..8c57bb44e 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -32,6 +32,7 @@ 宛先を選択 + Other folder 選択した宛先に書き込みできませんでした 宛先を選択してください 元と先を同じにすることはできません diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 0c114902d..a07e6c29f 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -32,6 +32,7 @@ Origem Destino Selecione o destino + Other folder Não foi possível escrever no destino selecionado Por favor selecione um destino A origem e o destino não podem ser iguais diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5ad807e72..04c571b99 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -33,6 +33,7 @@ Путь источника Путь назначения Выберите путь назначения + Other folder Не удалось записать в выбранное место Пожалуйста, выберите путь назначения Исходный и конечный пути не могут совпадать diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index f8c938f4c..f185fc7c8 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -32,6 +32,7 @@ Källa Mål Välj mål + Other folder Det gick inte att skriva till målet Please select a destination Source and destination cannot be the same diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 339a66230..b910cae85 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -33,6 +33,7 @@ 原路径 目标 选择目标 + Other folder 不能写入选中目标 请选择先目标 原路径和目标不能相同 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index aa5c3eecb..4d7c66d7b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -32,6 +32,7 @@ Source Destination Select destination + Other folder Could not write to the selected destination Please select a destination Source and destination cannot be the same