diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java index ce6d7257f..1324468c7 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java @@ -454,7 +454,7 @@ public class MainActivity extends SimpleActivity @Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { final MenuInflater inflater = mode.getMenuInflater(); - inflater.inflate(R.menu.directories_cab, menu); + inflater.inflate(R.menu.cab_directories, menu); mActionMode = mode; return true; } @@ -504,7 +504,7 @@ public class MainActivity extends SimpleActivity unhideFolders(); mode.finish(); return true; - case R.id.cab_copy: + case R.id.cab_copy_move: displayCopyDialog(); return true; default: diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java index 37572f7cb..49c6d68b3 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java @@ -502,7 +502,7 @@ public class MediaActivity extends SimpleActivity prepareForDeleting(); mode.finish(); return true; - case R.id.cab_copy: + case R.id.cab_copy_move: displayCopyDialog(); return true; default: diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java index 5f23b971b..27dcbe3d8 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java @@ -153,7 +153,7 @@ public class ViewPagerActivity extends SimpleActivity case R.id.menu_set_as_wallpaper: setAsWallpaper(); return true; - case R.id.menu_copy: + case R.id.menu_copy_move: displayCopyDialog(); return true; case R.id.menu_open_with: diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt index 169d3d082..1dfe9d786 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt @@ -6,21 +6,19 @@ import android.view.LayoutInflater import android.view.WindowManager import com.simplemobiletools.filepicker.extensions.humanizePath import com.simplemobiletools.filepicker.extensions.toast -import com.simplemobiletools.gallery.Config import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.SimpleActivity import com.simplemobiletools.gallery.asynctasks.CopyTask -import kotlinx.android.synthetic.main.copy_item.view.* +import kotlinx.android.synthetic.main.dialog_copy_move.view.* import java.io.File class CopyDialog(val activity: SimpleActivity, val files: List, val copyListener: CopyTask.CopyDoneListener, val listener: OnCopyListener) { init { val context = activity - val view = LayoutInflater.from(context).inflate(R.layout.copy_item, null) + val view = LayoutInflater.from(context).inflate(R.layout.dialog_copy_move, null) val sourcePath = files[0].parent.trimEnd('/') var destinationPath = "" - val config = Config.newInstance(context) view.source.text = context.humanizePath(sourcePath) @@ -70,30 +68,14 @@ class CopyDialog(val activity: SimpleActivity, val files: List, val copyLi return@setOnClickListener } - //if (view.dialog_radio_group.checkedRadioButtonId == R.id.dialog_radio_copy) { - context.toast(R.string.copying) - val pair = Pair, File>(files, destinationDir) - CopyTask(copyListener, context).execute(pair) - dismiss() - /*} else { - if (Utils.isPathOnSD(context, sourcePath) && Utils.isPathOnSD(context, destinationPath)) { - val paths = ArrayList() - for (f in files) { - val destination = File(destinationDir, f.name) - f.renameTo(destination) - paths.add(destination.absolutePath) - } + if (view.dialog_radio_group.checkedRadioButtonId == R.id.dialog_radio_copy) { + context.toast(R.string.copying) + val pair = Pair, File>(files, destinationDir) + CopyTask(copyListener, context).execute(pair) + dismiss() + } else { - context.scanFile(paths.toTypedArray()) - - dismiss() - listener.onSuccess() - } else { - val pair = Pair, File>(files, destinationDir) - CopyTask(copyListener, context).execute(pair) - dismiss() - } - }*/ + } }) } } diff --git a/app/src/main/res/layout/copy_item.xml b/app/src/main/res/layout/dialog_copy_move.xml similarity index 95% rename from app/src/main/res/layout/copy_item.xml rename to app/src/main/res/layout/dialog_copy_move.xml index c0f7098ea..d9da6f737 100644 --- a/app/src/main/res/layout/copy_item.xml +++ b/app/src/main/res/layout/dialog_copy_move.xml @@ -23,8 +23,7 @@ android:layout_marginBottom="@dimen/activity_margin" android:layout_marginLeft="@dimen/activity_margin" android:paddingRight="@dimen/small_padding" - android:paddingTop="@dimen/small_padding" - android:text="source"/> + android:paddingTop="@dimen/small_padding"/> - + diff --git a/app/src/main/res/menu/directories_cab.xml b/app/src/main/res/menu/cab_directories.xml similarity index 92% rename from app/src/main/res/menu/directories_cab.xml rename to app/src/main/res/menu/cab_directories.xml index 16b579fa9..974312b7e 100644 --- a/app/src/main/res/menu/directories_cab.xml +++ b/app/src/main/res/menu/cab_directories.xml @@ -22,8 +22,8 @@ android:title="@string/unhide_folder" app:showAsAction="ifRoom"/> diff --git a/app/src/main/res/menu/viewpager_menu.xml b/app/src/main/res/menu/viewpager_menu.xml index 3978a1f37..c18bcb7c0 100644 --- a/app/src/main/res/menu/viewpager_menu.xml +++ b/app/src/main/res/menu/viewpager_menu.xml @@ -2,8 +2,8 @@ Archivo guardado con éxito Copy Move - Copy/Move to + Copy/Move Copy item Copy items Source diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 2421e83f6..3e7c3b53b 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -40,7 +40,7 @@ File saved successfully コピー 移動 - Copy/Move to + Copy/Move アイテムをコピー アイテムをコピー diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 3a03d1745..cc7e31d56 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -40,7 +40,7 @@ File saved successfully Kopiera Flytta - Copy/Move to + Copy/Move Kopiera objekt Kopiera objekt Källa diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7a298f368..24e025676 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -40,7 +40,7 @@ File saved successfully Copy Move - Copy/Move to + Copy/Move Copy item Copy items Source