diff --git a/app/src/main/java/com/simplemobiletools/gallery/Utils.kt b/app/src/main/java/com/simplemobiletools/gallery/Utils.kt index 45a9db5d2..f47d84150 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/Utils.kt +++ b/app/src/main/java/com/simplemobiletools/gallery/Utils.kt @@ -18,10 +18,10 @@ import android.util.DisplayMetrics import android.util.TypedValue import android.view.* import android.webkit.MimeTypeMap -import android.widget.Toast import com.simplemobiletools.filepicker.extensions.getSDCardPath import com.simplemobiletools.gallery.dialogs.WritePermissionDialog import com.simplemobiletools.gallery.extensions.scanFile +import com.simplemobiletools.gallery.extensions.toast import com.simplemobiletools.gallery.models.Medium import java.io.File @@ -32,7 +32,7 @@ class Utils { } fun showToast(context: Context, resId: Int) { - Toast.makeText(context, context.resources.getString(resId), Toast.LENGTH_SHORT).show() + context.toast(resId) } fun getActionBarHeight(context: Context, res: Resources): Int { 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 fe10e0d9c..3e3b478c7 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java @@ -595,10 +595,11 @@ public class MainActivity extends SimpleActivity @Override public void copySucceeded(@NotNull File destinationDir) { getDirectories(); + Utils.Companion.showToast(getApplicationContext(), R.string.copying_success); } @Override public void copyFailed() { - + Utils.Companion.showToast(getApplicationContext(), R.string.copying_failed); } } 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 7facfcce5..9ac675736 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java @@ -552,11 +552,11 @@ public class MediaActivity extends SimpleActivity @Override public void copySucceeded(@NotNull File destinationDir) { - + Utils.Companion.showToast(getApplicationContext(), R.string.copying_success); } @Override public void copyFailed() { - + Utils.Companion.showToast(getApplicationContext(), R.string.copying_failed); } } 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 ff68cca5d..82edd1dc5 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java @@ -505,11 +505,11 @@ public class ViewPagerActivity extends SimpleActivity @Override public void copySucceeded(@NotNull File destinationDir) { - + Utils.Companion.showToast(getApplicationContext(), R.string.copying_success); } @Override public void copyFailed() { - + Utils.Companion.showToast(getApplicationContext(), R.string.copying_failed); } } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8eb91c99c..40aa5e431 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -53,6 +53,8 @@ Source and destination cannot be the same Konnte die Datei nicht kopieren Kopiere + Files copied successfully + An error occurred during the copy A file with that name already exists diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 52742dab5..2f98ead2f 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -53,6 +53,8 @@ Source and destination cannot be the same Could not copy the files Copying + Files copied successfully + An error occurred during the copy A file with that name already exists diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3ab68075d..5c3ab00c2 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -53,6 +53,8 @@ Source and destination cannot be the same Impossibile copiare i file Copia in corso + Files copied successfully + An error occurred during the copy A file with that name already exists diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 3593009b0..16ba855c9 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -53,6 +53,8 @@ Source and destination cannot be the same ファイルをコピーできませんでした コピー中 + Files copied successfully + An error occurred during the copy A file with that name already exists diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index eaba638bb..1ae81fb5b 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -53,6 +53,8 @@ A origem e o destino não podem ser iguais Não foi possível copiar os ficheiros A copiar + Files copied successfully + An error occurred during the copy Já existe um ficheiro com este nome diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 49d91dace..cf0785b0f 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -53,6 +53,8 @@ Source and destination cannot be the same Kunde inte kopiera filen Kopierar + Files copied successfully + An error occurred during the copy A file with that name already exists diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1bd0309e4..9147b5483 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -53,6 +53,8 @@ Source and destination cannot be the same Could not copy the files Copying + Files copied successfully + An error occurred during the copy A file with that name already exists