From 032466bb9936099fa9164dd733bc264739edc7fb Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 23 Sep 2018 16:54:13 +0200 Subject: add icon for unknown file while keeping 'file' icon for documents --- .../messenger/ui/adapter/MediaPreviewAdapter.java | 16 ++++++++++++++-- src/main/res/drawable-hdpi/ic_help_black_48dp.png | Bin 0 -> 1176 bytes src/main/res/drawable-hdpi/ic_help_white_48dp.png | Bin 0 -> 1177 bytes src/main/res/drawable-mdpi/ic_help_black_48dp.png | Bin 0 -> 656 bytes src/main/res/drawable-mdpi/ic_help_white_48dp.png | Bin 0 -> 659 bytes src/main/res/drawable-xhdpi/ic_help_black_48dp.png | Bin 0 -> 1406 bytes src/main/res/drawable-xhdpi/ic_help_white_48dp.png | Bin 0 -> 1426 bytes src/main/res/drawable-xxhdpi/ic_help_black_48dp.png | Bin 0 -> 2613 bytes src/main/res/drawable-xxhdpi/ic_help_white_48dp.png | Bin 0 -> 2702 bytes src/main/res/drawable-xxxhdpi/ic_help_black_48dp.png | Bin 0 -> 2945 bytes src/main/res/drawable-xxxhdpi/ic_help_white_48dp.png | Bin 0 -> 3067 bytes src/main/res/values/attrs.xml | 3 ++- src/main/res/values/themes.xml | 6 ++++-- 13 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 src/main/res/drawable-hdpi/ic_help_black_48dp.png create mode 100644 src/main/res/drawable-hdpi/ic_help_white_48dp.png create mode 100644 src/main/res/drawable-mdpi/ic_help_black_48dp.png create mode 100644 src/main/res/drawable-mdpi/ic_help_white_48dp.png create mode 100644 src/main/res/drawable-xhdpi/ic_help_black_48dp.png create mode 100644 src/main/res/drawable-xhdpi/ic_help_white_48dp.png create mode 100644 src/main/res/drawable-xxhdpi/ic_help_black_48dp.png create mode 100644 src/main/res/drawable-xxhdpi/ic_help_white_48dp.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_help_black_48dp.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_help_white_48dp.png diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java index c89ce6216..3d9bce508 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java @@ -17,6 +17,7 @@ import android.widget.ImageView; import java.lang.ref.WeakReference; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.concurrent.RejectedExecutionException; @@ -29,6 +30,15 @@ import de.pixart.messenger.ui.util.StyledAttributes; public class MediaPreviewAdapter extends RecyclerView.Adapter { + private static final List DOCUMENT_MIMES = Arrays.asList( + "application/pdf", + "application/vnd.oasis.opendocument.text", + "application/msword", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "text/x-tex", + "text/plain" + ); + private final ArrayList mediaPreviews = new ArrayList<>(); private final ConversationFragment conversationFragment; @@ -89,7 +99,7 @@ public class MediaPreviewAdapter extends RecyclerView.Adapter - + @@ -50,6 +50,7 @@ + diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml index 628963db2..0d2eab4fe 100644 --- a/src/main/res/values/themes.xml +++ b/src/main/res/values/themes.xml @@ -65,7 +65,7 @@ @drawable/ic_send_voice_offline - @drawable/ic_description_black_48dp + @drawable/ic_description_black_48dp @drawable/ic_mic_black_48dp @drawable/ic_headset_black_48dp @drawable/ic_room_black_48dp @@ -73,6 +73,7 @@ @drawable/ic_android_black_48dp @drawable/ic_event_black_48dp @drawable/ic_archive_black_48dp + @drawable/ic_help_black_48dp @drawable/ic_group_add_white_24dp @drawable/ic_person_add_white_24dp @@ -234,7 +235,7 @@ 24dp 16dp - @drawable/ic_description_white_48dp + @drawable/ic_description_white_48dp @drawable/ic_mic_white_48dp @drawable/ic_headset_white_48dp @drawable/ic_room_white_48dp @@ -242,6 +243,7 @@ @drawable/ic_android_white_48dp @drawable/ic_event_white_48dp @drawable/ic_archive_white_48dp + @drawable/ic_help_white_48dp @drawable/ic_group_add_white_24dp @drawable/ic_person_add_white_24dp -- cgit v1.2.3