aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/ViewUtil.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java b/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java
index 931477425..4a9251832 100644
--- a/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java
+++ b/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java
@@ -17,6 +17,7 @@ import de.pixart.messenger.R;
import de.pixart.messenger.entities.DownloadableFile;
import de.pixart.messenger.persistance.FileBackend;
import de.pixart.messenger.ui.MediaViewerActivity;
+import me.drakeet.support.toast.ToastCompat;
public class ViewUtil {
@@ -28,7 +29,7 @@ public class ViewUtil {
public static void view(Context context, DownloadableFile file) {
if (!file.exists()) {
- Toast.makeText(context, R.string.file_deleted, Toast.LENGTH_SHORT).show();
+ ToastCompat.makeText(context, R.string.file_deleted, Toast.LENGTH_SHORT).show();
return;
}
String mime = file.getMimeType();
@@ -44,7 +45,7 @@ public class ViewUtil {
uri = FileBackend.getUriForFile(context, file);
} catch (SecurityException e) {
Log.d(Config.LOGTAG, "No permission to access " + file.getAbsolutePath(), e);
- Toast.makeText(context, context.getString(R.string.no_permission_to_access_x, file.getAbsolutePath()), Toast.LENGTH_SHORT).show();
+ ToastCompat.makeText(context, context.getString(R.string.no_permission_to_access_x, file.getAbsolutePath()), Toast.LENGTH_SHORT).show();
return;
}
// use internal viewer for images and videos
@@ -78,7 +79,7 @@ public class ViewUtil {
try {
context.startActivity(openIntent);
} catch (ActivityNotFoundException e) {
- Toast.makeText(context, R.string.no_application_found_to_open_file, Toast.LENGTH_SHORT).show();
+ ToastCompat.makeText(context, R.string.no_application_found_to_open_file, Toast.LENGTH_SHORT).show();
}
}
}