add more thumbnail icons for various file types

This commit is contained in:
Daniel Gultsch 2018-09-12 18:10:37 +02:00
parent 943f11e1f6
commit d7cdec002c
43 changed files with 24 additions and 1 deletions

View file

@ -62,8 +62,19 @@ public class MediaPreviewAdapter extends RecyclerView.Adapter<MediaPreviewAdapte
} else if (attachment.getType() == Attachment.Type.RECORDING) { } else if (attachment.getType() == Attachment.Type.RECORDING) {
attr = R.attr.media_preview_recording; attr = R.attr.media_preview_recording;
} else { } else {
if (attachment.getMime() != null && attachment.getMime().startsWith("audio/")) { final String mime = attachment.getMime();
if (mime == null) {
attr = R.attr.media_preview_file;
} else if (mime.startsWith("audio/")) {
attr = R.attr.media_preview_audio; attr = R.attr.media_preview_audio;
} else if (mime.equals("text/calendar") || (mime.equals("text/x-vcalendar"))) {
attr = R.attr.media_preview_calendar;
} else if (mime.equals("text/x-vcard")) {
attr = R.attr.media_preview_contact;
} else if (mime.equals("application/vnd.android.package-archive")) {
attr = R.attr.media_preview_app;
} else if (mime.equals("application/zip") || mime.equals("application/rar")) {
attr = R.attr.media_preview_archive;
} else { } else {
attr = R.attr.media_preview_file; attr = R.attr.media_preview_file;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -56,6 +56,10 @@
<attr name="media_preview_recording" format="reference"/> <attr name="media_preview_recording" format="reference"/>
<attr name="media_preview_audio" format="reference"/> <attr name="media_preview_audio" format="reference"/>
<attr name="media_preview_location" format="reference"/> <attr name="media_preview_location" format="reference"/>
<attr name="media_preview_contact" format="reference"/>
<attr name="media_preview_app" format="reference"/>
<attr name="media_preview_calendar" format="reference"/>
<attr name="media_preview_archive" format="reference" />
<attr name="icon_add_group" format="reference"/> <attr name="icon_add_group" format="reference"/>

View file

@ -67,6 +67,10 @@
<item type="reference" name="media_preview_recording">@drawable/ic_mic_black_48dp</item> <item type="reference" name="media_preview_recording">@drawable/ic_mic_black_48dp</item>
<item type="reference" name="media_preview_audio">@drawable/ic_headset_black_48dp</item> <item type="reference" name="media_preview_audio">@drawable/ic_headset_black_48dp</item>
<item type="reference" name="media_preview_location">@drawable/ic_room_black_48dp</item> <item type="reference" name="media_preview_location">@drawable/ic_room_black_48dp</item>
<item type="reference" name="media_preview_contact">@drawable/ic_person_black_48dp</item>
<item type="reference" name="media_preview_app">@drawable/ic_android_black_48dp</item>
<item type="reference" name="media_preview_calendar">@drawable/ic_event_black_48dp</item>
<item type="reference" name="media_preview_archive">@drawable/ic_archive_black_48dp</item>
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item> <item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item>
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item> <item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item>
@ -173,6 +177,10 @@
<item type="reference" name="media_preview_recording">@drawable/ic_mic_white_48dp</item> <item type="reference" name="media_preview_recording">@drawable/ic_mic_white_48dp</item>
<item type="reference" name="media_preview_audio">@drawable/ic_headset_white_48dp</item> <item type="reference" name="media_preview_audio">@drawable/ic_headset_white_48dp</item>
<item type="reference" name="media_preview_location">@drawable/ic_room_white_48dp</item> <item type="reference" name="media_preview_location">@drawable/ic_room_white_48dp</item>
<item type="reference" name="media_preview_contact">@drawable/ic_person_white_48dp</item>
<item type="reference" name="media_preview_app">@drawable/ic_android_white_48dp</item>
<item type="reference" name="media_preview_calendar">@drawable/ic_event_white_48dp</item>
<item type="reference" name="media_preview_archive">@drawable/ic_archive_white_48dp</item>
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item> <item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item>
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item> <item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item>