update commons to 2.2.0

This commit is contained in:
tibbi 2017-01-07 15:58:01 +01:00
parent aaab1593c0
commit 92959d474c
3 changed files with 10 additions and 20 deletions

View File

@ -32,7 +32,7 @@ android {
} }
dependencies { dependencies {
compile 'com.simplemobiletools:commons:2.1.10' compile 'com.simplemobiletools:commons:2.2.0'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1' compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'

View File

@ -40,13 +40,8 @@ class PickAlbumDialog(val activity: SimpleActivity, val callback: (path: String)
fun showOtherFolder() { fun showOtherFolder() {
val initialPath = Environment.getExternalStorageDirectory().toString() val initialPath = Environment.getExternalStorageDirectory().toString()
val showHidden = Config.newInstance(activity).showHiddenFolders val showHidden = Config.newInstance(activity).showHiddenFolders
FilePickerDialog(activity, initialPath, false, showHidden, object : FilePickerDialog.OnFilePickerListener { FilePickerDialog(activity, initialPath, false, showHidden) {
override fun onSuccess(pickedPath: String) { callback.invoke(it)
callback.invoke(pickedPath) }
}
override fun onFail(error: FilePickerDialog.FilePickerResult) {
}
})
} }
} }

View File

@ -1,16 +1,16 @@
package com.simplemobiletools.gallery.dialogs package com.simplemobiletools.gallery.dialogs
import android.app.Activity
import android.support.v7.app.AlertDialog import android.support.v7.app.AlertDialog
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.WindowManager import android.view.WindowManager
import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.R
import com.simplemobiletools.gallery.activities.SimpleActivity
import kotlinx.android.synthetic.main.rename_file.view.* import kotlinx.android.synthetic.main.rename_file.view.*
import java.io.File import java.io.File
class SaveAsDialog(val activity: Activity, val path: String, val callback: (savePath: String) -> Unit) { class SaveAsDialog(val activity: SimpleActivity, val path: String, val callback: (savePath: String) -> Unit) {
init { init {
var realPath = File(path).parent.trimEnd('/') var realPath = File(path).parent.trimEnd('/')
@ -29,15 +29,10 @@ class SaveAsDialog(val activity: Activity, val path: String, val callback: (save
file_name.setText(name) file_name.setText(name)
file_path.setOnClickListener { file_path.setOnClickListener {
FilePickerDialog(activity, realPath, false, false, listener = object : FilePickerDialog.OnFilePickerListener { FilePickerDialog(activity, realPath, false, false) {
override fun onSuccess(pickedPath: String) { file_path.text = activity.humanizePath(it)
file_path.text = activity.humanizePath(pickedPath) realPath = it
realPath = pickedPath }
}
override fun onFail(error: FilePickerDialog.FilePickerResult) {
}
})
} }
} }