add more thumbnail icons for various file types
|
@ -62,8 +62,19 @@ public class MediaPreviewAdapter extends RecyclerView.Adapter<MediaPreviewAdapte
|
|||
} else if (attachment.getType() == Attachment.Type.RECORDING) {
|
||||
attr = R.attr.media_preview_recording;
|
||||
} 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;
|
||||
} 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 {
|
||||
attr = R.attr.media_preview_file;
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 519 B |
After Width: | Height: | Size: 536 B |
After Width: | Height: | Size: 377 B |
After Width: | Height: | Size: 390 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 428 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 343 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 267 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 193 B |
After Width: | Height: | Size: 307 B |
After Width: | Height: | Size: 312 B |
After Width: | Height: | Size: 641 B |
After Width: | Height: | Size: 665 B |
After Width: | Height: | Size: 483 B |
After Width: | Height: | Size: 489 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 326 B |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 577 B |
After Width: | Height: | Size: 975 B |
After Width: | Height: | Size: 1012 B |
After Width: | Height: | Size: 718 B |
After Width: | Height: | Size: 738 B |
After Width: | Height: | Size: 484 B |
After Width: | Height: | Size: 513 B |
After Width: | Height: | Size: 846 B |
After Width: | Height: | Size: 863 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 945 B |
After Width: | Height: | Size: 971 B |
After Width: | Height: | Size: 713 B |
After Width: | Height: | Size: 744 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
|
@ -56,6 +56,10 @@
|
|||
<attr name="media_preview_recording" format="reference"/>
|
||||
<attr name="media_preview_audio" 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"/>
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
<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_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_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_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_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_person">@drawable/ic_person_add_white_24dp</item>
|
||||
|
|