notify the user when the copy fails or succeeds
This commit is contained in:
parent
dfae308cc7
commit
a971b215a5
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<string name="source_and_destination_same">Source and destination cannot be the same</string>
|
||||
<string name="copy_failed">Konnte die Datei nicht kopieren</string>
|
||||
<string name="copying">Kopiere</string>
|
||||
<string name="copying_success">Files copied successfully</string>
|
||||
<string name="copying_failed">An error occurred during the copy</string>
|
||||
<string name="already_exists">A file with that name already exists</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<string name="source_and_destination_same">Source and destination cannot be the same</string>
|
||||
<string name="copy_failed">Could not copy the files</string>
|
||||
<string name="copying">Copying</string>
|
||||
<string name="copying_success">Files copied successfully</string>
|
||||
<string name="copying_failed">An error occurred during the copy</string>
|
||||
<string name="already_exists">A file with that name already exists</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<string name="source_and_destination_same">Source and destination cannot be the same</string>
|
||||
<string name="copy_failed">Impossibile copiare i file</string>
|
||||
<string name="copying">Copia in corso</string>
|
||||
<string name="copying_success">Files copied successfully</string>
|
||||
<string name="copying_failed">An error occurred during the copy</string>
|
||||
<string name="already_exists">A file with that name already exists</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<string name="source_and_destination_same">Source and destination cannot be the same</string>
|
||||
<string name="copy_failed">ファイルをコピーできませんでした</string>
|
||||
<string name="copying">コピー中</string>
|
||||
<string name="copying_success">Files copied successfully</string>
|
||||
<string name="copying_failed">An error occurred during the copy</string>
|
||||
<string name="already_exists">A file with that name already exists</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<string name="source_and_destination_same">A origem e o destino não podem ser iguais</string>
|
||||
<string name="copy_failed">Não foi possível copiar os ficheiros</string>
|
||||
<string name="copying">A copiar</string>
|
||||
<string name="copying_success">Files copied successfully</string>
|
||||
<string name="copying_failed">An error occurred during the copy</string>
|
||||
<string name="already_exists">Já existe um ficheiro com este nome</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<string name="source_and_destination_same">Source and destination cannot be the same</string>
|
||||
<string name="copy_failed">Kunde inte kopiera filen</string>
|
||||
<string name="copying">Kopierar</string>
|
||||
<string name="copying_success">Files copied successfully</string>
|
||||
<string name="copying_failed">An error occurred during the copy</string>
|
||||
<string name="already_exists">A file with that name already exists</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
<string name="source_and_destination_same">Source and destination cannot be the same</string>
|
||||
<string name="copy_failed">Could not copy the files</string>
|
||||
<string name="copying">Copying</string>
|
||||
<string name="copying_success">Files copied successfully</string>
|
||||
<string name="copying_failed">An error occurred during the copy</string>
|
||||
<string name="already_exists">A file with that name already exists</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
|
|
Loading…
Reference in New Issue